@@ -144,7 +144,7 @@ public function testSet()
144144 {
145145 $ sc = new Container ();
146146 $ sc ->set ('foo ' , $ foo = new \stdClass ());
147- $ this ->assertEquals ($ foo , $ sc ->get ('foo ' ), '->set() sets a service ' );
147+ $ this ->assertSame ($ foo , $ sc ->get ('foo ' ), '->set() sets a service ' );
148148 }
149149
150150 public function testSetWithNullResetTheService ()
@@ -166,14 +166,14 @@ public function testGet()
166166 {
167167 $ sc = new ProjectServiceContainer ();
168168 $ sc ->set ('foo ' , $ foo = new \stdClass ());
169- $ this ->assertEquals ($ foo , $ sc ->get ('foo ' ), '->get() returns the service for the given id ' );
170- $ this ->assertEquals ($ foo , $ sc ->get ('Foo ' ), '->get() returns the service for the given id, and converts id to lowercase ' );
171- $ this ->assertEquals ($ sc ->__bar , $ sc ->get ('bar ' ), '->get() returns the service for the given id ' );
172- $ this ->assertEquals ($ sc ->__foo_bar , $ sc ->get ('foo_bar ' ), '->get() returns the service if a get*Method() is defined ' );
173- $ this ->assertEquals ($ sc ->__foo_baz , $ sc ->get ('foo.baz ' ), '->get() returns the service if a get*Method() is defined ' );
169+ $ this ->assertSame ($ foo , $ sc ->get ('foo ' ), '->get() returns the service for the given id ' );
170+ $ this ->assertSame ($ foo , $ sc ->get ('Foo ' ), '->get() returns the service for the given id, and converts id to lowercase ' );
171+ $ this ->assertSame ($ sc ->__bar , $ sc ->get ('bar ' ), '->get() returns the service for the given id ' );
172+ $ this ->assertSame ($ sc ->__foo_bar , $ sc ->get ('foo_bar ' ), '->get() returns the service if a get*Method() is defined ' );
173+ $ this ->assertSame ($ sc ->__foo_baz , $ sc ->get ('foo.baz ' ), '->get() returns the service if a get*Method() is defined ' );
174174
175175 $ sc ->set ('bar ' , $ bar = new \stdClass ());
176- $ this ->assertEquals ($ bar , $ sc ->get ('bar ' ), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod() ' );
176+ $ this ->assertSame ($ bar , $ sc ->get ('bar ' ), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod() ' );
177177
178178 try {
179179 $ sc ->get ('' );
@@ -196,15 +196,15 @@ public function testLegacyGet()
196196 $ sc = new LegacyProjectServiceContainer ();
197197 $ sc ->set ('foo ' , $ foo = new \stdClass ());
198198
199- $ this ->assertEquals ($ foo , $ sc ->get ('foo ' ), '->get() returns the service for the given id ' );
200- $ this ->assertEquals ($ foo , $ sc ->get ('Foo ' ), '->get() returns the service for the given id, and converts id to lowercase ' );
201- $ this ->assertEquals ($ sc ->__bar , $ sc ->get ('bar ' ), '->get() returns the service for the given id ' );
202- $ this ->assertEquals ($ sc ->__foo_bar , $ sc ->get ('foo_bar ' ), '->get() returns the service if a get*Method() is defined ' );
203- $ this ->assertEquals ($ sc ->__foo_baz , $ sc ->get ('foo.baz ' ), '->get() returns the service if a get*Method() is defined ' );
204- $ this ->assertEquals ($ sc ->__foo_baz , $ sc ->get ('foo \\baz ' ), '->get() returns the service if a get*Method() is defined ' );
199+ $ this ->assertSame ($ foo , $ sc ->get ('foo ' ), '->get() returns the service for the given id ' );
200+ $ this ->assertSame ($ foo , $ sc ->get ('Foo ' ), '->get() returns the service for the given id, and converts id to lowercase ' );
201+ $ this ->assertSame ($ sc ->__bar , $ sc ->get ('bar ' ), '->get() returns the service for the given id ' );
202+ $ this ->assertSame ($ sc ->__foo_bar , $ sc ->get ('foo_bar ' ), '->get() returns the service if a get*Method() is defined ' );
203+ $ this ->assertSame ($ sc ->__foo_baz , $ sc ->get ('foo.baz ' ), '->get() returns the service if a get*Method() is defined ' );
204+ $ this ->assertSame ($ sc ->__foo_baz , $ sc ->get ('foo \\baz ' ), '->get() returns the service if a get*Method() is defined ' );
205205
206206 $ sc ->set ('bar ' , $ bar = new \stdClass ());
207- $ this ->assertEquals ($ bar , $ sc ->get ('bar ' ), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod() ' );
207+ $ this ->assertSame ($ bar , $ sc ->get ('bar ' ), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod() ' );
208208
209209 try {
210210 $ sc ->get ('' );
0 commit comments