@@ -134,7 +134,7 @@ public function testSet()
134
134
{
135
135
$ sc = new Container ();
136
136
$ sc ->set ('foo ' , $ foo = new \stdClass ());
137
- $ this ->assertEquals ($ foo , $ sc ->get ('foo ' ), '->set() sets a service ' );
137
+ $ this ->assertSame ($ foo , $ sc ->get ('foo ' ), '->set() sets a service ' );
138
138
}
139
139
140
140
public function testSetWithNullResetTheService ()
@@ -196,15 +196,15 @@ public function testGet()
196
196
{
197
197
$ sc = new ProjectServiceContainer ();
198
198
$ sc ->set ('foo ' , $ foo = new \stdClass ());
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 ' );
205
205
206
206
$ 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() ' );
208
208
209
209
try {
210
210
$ sc ->get ('' );
0 commit comments