silverstripe-framework/tests/php/Forms/InlineFormActionTest.php
2016-11-23 19:25:12 +13:00

24 lines
705 B
PHP

<?php
namespace SilverStripe\Forms\Tests;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Forms\InlineFormAction;
/**
* Tests {@see InlineFormAction}
*/
class InlineFormActionTest extends SapphireTest {
public function testField() {
$action = new InlineFormAction('dothing', 'My Title', 'ss-action');
$html = (string)$action->Field();
$this->assertContains('<input', $html);
$this->assertContains('type="submit"', $html);
$this->assertContains('name="action_dothing"', $html);
$this->assertContains('value="My Title"', $html);
$this->assertContains('id="dothing"', $html);
$this->assertContains('class="action ss-action"', $html);
}
}