@@ 16-52 (lines=37) @@ | ||
13 | /** |
|
14 | * PagePartAdminTypeTestCase |
|
15 | */ |
|
16 | class PagePartAdminTypeTestCase extends WebTestCase |
|
17 | { |
|
18 | /** |
|
19 | * @var FormBuilder |
|
20 | */ |
|
21 | protected $builder; |
|
22 | ||
23 | /** |
|
24 | * @var EventDispatcher |
|
25 | */ |
|
26 | protected $dispatcher; |
|
27 | ||
28 | /** |
|
29 | * @var \Symfony\Component\Form\FormFactoryInterface |
|
30 | */ |
|
31 | protected $factory; |
|
32 | ||
33 | /** |
|
34 | * @var OptionsResolver |
|
35 | */ |
|
36 | protected $resolver; |
|
37 | ||
38 | /** |
|
39 | * Sets up the fixture, for example, opens a network connection. |
|
40 | * This method is called before a test is executed. |
|
41 | */ |
|
42 | protected function setUp() |
|
43 | { |
|
44 | $formFactoryBuilderInterface = Forms::createFormFactoryBuilder(); |
|
45 | $formFactoryBuilderInterface->addType(new URLChooserType()); |
|
46 | $formFactoryBuilderInterface->addTypeGuesser(new DoctrineOrmTypeGuesser($this->createMock('Doctrine\Common\Persistence\ManagerRegistry'))); |
|
47 | $this->factory = $formFactoryBuilderInterface->getFormFactory(); |
|
48 | $this->dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); |
|
49 | $this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory); |
|
50 | $this->resolver = new OptionsResolver(); |
|
51 | } |
|
52 | } |
|
53 |
@@ 16-52 (lines=37) @@ | ||
13 | /** |
|
14 | * AbstractTypeTestCase |
|
15 | */ |
|
16 | abstract class AbstractTypeTest extends WebTestCase |
|
17 | { |
|
18 | /** |
|
19 | * @var FormBuilder |
|
20 | */ |
|
21 | protected $builder; |
|
22 | ||
23 | /** |
|
24 | * @var EventDispatcher |
|
25 | */ |
|
26 | protected $dispatcher; |
|
27 | ||
28 | /** |
|
29 | * @var \Symfony\Component\Form\FormFactoryInterface |
|
30 | */ |
|
31 | protected $factory; |
|
32 | ||
33 | /** |
|
34 | * @var OptionsResolver |
|
35 | */ |
|
36 | protected $resolver; |
|
37 | ||
38 | /** |
|
39 | * Sets up the fixture, for example, opens a network connection. |
|
40 | * This method is called before a test is executed. |
|
41 | */ |
|
42 | protected function setUp() |
|
43 | { |
|
44 | $formFactoryBuilderInterface = Forms::createFormFactoryBuilder(); |
|
45 | $formFactoryBuilderInterface->addType(new URLChooserType()); |
|
46 | $formFactoryBuilderInterface->addTypeGuesser(new DoctrineOrmTypeGuesser($this->createMock('Doctrine\Common\Persistence\ManagerRegistry'))); |
|
47 | $this->factory = $formFactoryBuilderInterface->getFormFactory(); |
|
48 | $this->dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface'); |
|
49 | $this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory); |
|
50 | $this->resolver = new OptionsResolver(); |
|
51 | } |
|
52 | } |
|
53 |