4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Form\Tests
;
14 use Symfony\Component\Form\AbstractExtension
;
15 use Symfony\Component\Form\Tests\Fixtures\FooType
;
17 class AbstractExtensionTest
extends \PHPUnit_Framework_TestCase
19 public function testHasType()
21 $loader = new ConcreteExtension();
22 $this->assertTrue($loader->hasType('foo'));
23 $this->assertFalse($loader->hasType('bar'));
26 public function testGetType()
28 $loader = new ConcreteExtension();
29 $this->assertInstanceOf('Symfony\Component\Form\Tests\Fixtures\FooType', $loader->getType('foo'));
33 class ConcreteExtension
extends AbstractExtension
35 protected function loadTypes()
37 return array(new FooType());
40 protected function loadTypeGuesser()