]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/symfony/form/Symfony/Component/Form/Tests/AbstractExtensionTest.php
twig implementation
[github/wallabag/wallabag.git] / vendor / symfony / form / Symfony / Component / Form / Tests / AbstractExtensionTest.php
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Form\Tests;
13
14 use Symfony\Component\Form\AbstractExtension;
15 use Symfony\Component\Form\Tests\Fixtures\FooType;
16
17 class AbstractExtensionTest extends \PHPUnit_Framework_TestCase
18 {
19 public function testHasType()
20 {
21 $loader = new ConcreteExtension();
22 $this->assertTrue($loader->hasType('foo'));
23 $this->assertFalse($loader->hasType('bar'));
24 }
25
26 public function testGetType()
27 {
28 $loader = new ConcreteExtension();
29 $this->assertInstanceOf('Symfony\Component\Form\Tests\Fixtures\FooType', $loader->getType('foo'));
30 }
31 }
32
33 class ConcreteExtension extends AbstractExtension
34 {
35 protected function loadTypes()
36 {
37 return array(new FooType());
38 }
39
40 protected function loadTypeGuesser()
41 {
42 }
43 }