public function testSaveFull() { $theme = Theme::load('apitest'); $destFilePath = $theme->getPath() . '/testobjects/compound.htm'; if (file_exists($destFilePath)) { unlink($destFilePath); } $this->assertFileNotExists($destFilePath); $obj = new TestCmsCompoundObject($theme); $obj->fill(['fileName' => 'compound', 'settings' => ['var' => 'value'], 'code' => 'function a() {return true;}', 'markup' => '<p>Hello, world!</p>']); $obj->save(); $referenceFilePath = base_path() . '/tests/fixtures/cms/reference/compound-full.htm'; $this->assertFileExists($referenceFilePath); $this->assertFileExists($destFilePath); $this->assertFileEqualsNormalized($referenceFilePath, $destFilePath); }