16
16
17
17
class ResolveParameterPlaceHoldersPassTest extends \PHPUnit_Framework_TestCase
18
18
{
19
- private $ compilerPass ;
20
- private $ container ;
21
- private $ fooDefinition ;
19
+ protected $ compilerPass ;
20
+ protected $ container ;
21
+ protected $ fooDefinition ;
22
22
23
23
protected function setUp ()
24
24
{
@@ -28,16 +28,6 @@ protected function setUp()
28
28
$ this ->fooDefinition = $ this ->container ->getDefinition ('foo ' );
29
29
}
30
30
31
- public function testClassParametersShouldBeResolved ()
32
- {
33
- $ this ->assertSame ('Foo ' , $ this ->fooDefinition ->getClass ());
34
- }
35
-
36
- public function testFactoryClassParametersShouldBeResolved ()
37
- {
38
- $ this ->assertSame ('FooFactory ' , $ this ->fooDefinition ->getFactoryClass ());
39
- }
40
-
41
31
public function testArgumentParametersShouldBeResolved ()
42
32
{
43
33
$ this ->assertSame (array ('bar ' , 'baz ' ), $ this ->fooDefinition ->getArguments ());
@@ -68,7 +58,6 @@ private function createContainerBuilder()
68
58
$ containerBuilder = new ContainerBuilder ();
69
59
70
60
$ containerBuilder ->setParameter ('foo.class ' , 'Foo ' );
71
- $ containerBuilder ->setParameter ('foo.factory.class ' , 'FooFactory ' );
72
61
$ containerBuilder ->setParameter ('foo.arg1 ' , 'bar ' );
73
62
$ containerBuilder ->setParameter ('foo.arg2 ' , 'baz ' );
74
63
$ containerBuilder ->setParameter ('foo.method ' , 'foobar ' );
@@ -78,7 +67,6 @@ private function createContainerBuilder()
78
67
$ containerBuilder ->setParameter ('alias.id ' , 'bar ' );
79
68
80
69
$ fooDefinition = $ containerBuilder ->register ('foo ' , '%foo.class% ' );
81
- $ fooDefinition ->setFactoryClass ('%foo.factory.class% ' );
82
70
$ fooDefinition ->setArguments (array ('%foo.arg1% ' , '%foo.arg2% ' ));
83
71
$ fooDefinition ->addMethodCall ('%foo.method% ' , array ('%foo.arg1% ' , '%foo.arg2% '));
84
72
$ fooDefinition ->setProperty ('%foo.property.name% ' , '%foo.property.value% ' );
@@ -88,4 +76,11 @@ private function createContainerBuilder()
88
76
89
77
return $ containerBuilder ;
90
78
}
79
+
80
+ protected function tearDown ()
81
+ {
82
+ $ this ->compilerPass = null ;
83
+ $ this ->container = null ;
84
+ $ this ->fooDefinition = null ;
85
+ }
91
86
}
0 commit comments