2017-11-03 10:44:45 +13:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\UserForms\Tests\Model\EditableFormField;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
use SilverStripe\UserForms\Model\EditableFormField\EditableCountryDropdownField;
|
|
|
|
|
|
|
|
class EditableCountryDropdownFieldTest extends SapphireTest
|
|
|
|
{
|
|
|
|
public function testGetIcon()
|
|
|
|
{
|
|
|
|
$field = new EditableCountryDropdownField;
|
|
|
|
|
|
|
|
$this->assertContains('/images/editabledropdown.png', $field->getIcon());
|
|
|
|
}
|
2018-03-23 16:18:32 +13:00
|
|
|
|
|
|
|
public function testAllowEmptyTitle()
|
|
|
|
{
|
|
|
|
/** @var EditableCountryDropdownField $field */
|
|
|
|
$field = EditableCountryDropdownField::create();
|
|
|
|
$field->Name = 'EditableFormField_123456';
|
|
|
|
$this->assertEmpty($field->getFormField()->Title());
|
|
|
|
}
|
2017-11-03 10:44:45 +13:00
|
|
|
}
|