Commit 32640626 authored by chihiro-adachi's avatar chihiro-adachi Committed by Fabien Potencier

Added test of FormTrait::namedForm()

parent 3435cbb3
......@@ -13,6 +13,7 @@ namespace Silex\Tests\Application;
use PHPUnit\Framework\TestCase;
use Silex\Provider\FormServiceProvider;
use Symfony\Component\Form\FormBuilder;
/**
* FormTrait test cases.
......@@ -23,7 +24,15 @@ class FormTraitTest extends TestCase
{
public function testForm()
{
$this->assertInstanceOf('Symfony\Component\Form\FormBuilder', $this->createApplication()->form());
$this->assertInstanceOf(FormBuilder::class, $this->createApplication()->form());
}
public function testNamedForm()
{
$builder = $this->createApplication()->namedForm('foo');
$this->assertInstanceOf(FormBuilder::class, $builder);
$this->assertSame('foo', $builder->getName());
}
public function createApplication()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment