|
@@ -39,9 +39,11 @@ class FormTypeFieldExtensionTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
|
$this->assertArrayHasKey('sonata_admin', $options);
|
|
|
$this->assertArrayHasKey('sonata_field_description', $options);
|
|
|
+ $this->assertArrayHasKey('sonata_admin_help', $options);
|
|
|
|
|
|
$this->assertNull($options['sonata_admin']);
|
|
|
$this->assertNull($options['sonata_field_description']);
|
|
|
+ $this->assertNull($options['sonata_admin_help']);
|
|
|
}
|
|
|
|
|
|
public function testbuildViewWithNoSonataAdminArray()
|
|
@@ -96,7 +98,9 @@ class FormTypeFieldExtensionTest extends \PHPUnit_Framework_TestCase
|
|
|
$formView->vars['block_prefixes'] = array('form', 'field', 'text', '_s50b26aa76cb96_username');
|
|
|
|
|
|
$extension = new FormTypeFieldExtension();
|
|
|
- $extension->buildView($formView, $form, array());
|
|
|
+ $extension->buildView($formView, $form, array(
|
|
|
+ 'sonata_admin_help' => 'help text'
|
|
|
+ ));
|
|
|
|
|
|
$this->assertArrayHasKey('block_prefixes', $formView->vars);
|
|
|
$this->assertArrayHasKey('sonata_admin_enabled', $formView->vars);
|
|
@@ -113,5 +117,6 @@ class FormTypeFieldExtensionTest extends \PHPUnit_Framework_TestCase
|
|
|
|
|
|
$this->assertEquals($expected, $formView->vars['block_prefixes']);
|
|
|
$this->assertTrue($formView->vars['sonata_admin_enabled']);
|
|
|
+ $this->assertEquals('help text', $formView->vars['sonata_admin_help']);
|
|
|
}
|
|
|
}
|