public function testPixlrEditorExtension() { $controller = new ContentController(); $toolbar = new HtmlEditorField_Toolbar($controller, 'DummyToolbar'); $imageForm = $toolbar->ImageForm(); // we expect the image form to now have the pixlr component inside $fields = $imageForm->Fields(); $this->assertNotNull($fields->dataFieldByName('NewPixlrImage')); }
public function testExtendImageFormFields() { if (class_exists('ThumbnailStripField')) { $controller = new Controller(); $toolbar = new HtmlEditorField_Toolbar($controller, 'DummyToolbar'); $imageForm = $toolbar->ImageForm(); $this->assertTrue(HtmlEditorFieldTest_DummyImageFormFieldExtension::$update_called); $this->assertEquals($imageForm->Fields(), HtmlEditorFieldTest_DummyImageFormFieldExtension::$fields); } else { $this->markTestSkipped('Test requires cms module (ThumbnailStripfield class)'); } }
public function testExtendImageFormFields() { $controller = new ContentController(); $toolbar = new HtmlEditorField_Toolbar($controller, 'DummyToolbar'); $imageForm = $toolbar->ImageForm(); $this->assertTrue(HtmlEditorFieldTest_DummyImageFormFieldExtension::$update_called); $this->assertEquals($imageForm->Fields(), HtmlEditorFieldTest_DummyImageFormFieldExtension::$fields); }