public function getEmptyContent($contenttypeslug) { $content = $this->getContentObject($contenttypeslug); // don't use 'undefined contenttype' as title/name $content->setValues(['name' => '', 'title' => '']); return $content; }
public function testGetEmptyContent() { $app = $this->getApp(); $storage = new Storage($app); $showcase = $storage->getEmptyContent('showcase'); $this->assertInstanceOf('Bolt\\Legacy\\Content', $showcase); $this->assertEquals('showcases', $showcase->contenttype['slug']); }