for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class CWPCarouselItemExtensionTest extends SapphireTest
{
/**
* Ensure that the caption is replaced by a HTML editor for content
*/
public function testCaptionIsReplacedByContent()
$carouselItem = new CarouselItem;
$fields = $carouselItem->getCMSFields();
$this->assertInstanceOf('HtmlEditorField', $fields->fieldByName('Content'));
$this->assertNull($fields->fieldByName('Caption'));
}
* Ensure that we have a primary and secondary call to action link/label
public function testHasCallToActionFields()
$this->assertInstanceOf('TextField', $fields->fieldByName('PrimaryCallToActionLabel'));
$this->assertInstanceOf('TextField', $fields->fieldByName('SecondaryCallToActionLabel'));