@@ -132,7 +132,7 @@ public function testSet()
132
132
{
133
133
$ sc = new Container ();
134
134
$ sc ->set ('foo ' , $ foo = new \stdClass ());
135
- $ this ->assertEquals ($ foo , $ sc ->get ('foo ' ), '->set() sets a service ' );
135
+ $ this ->assertSame ($ foo , $ sc ->get ('foo ' ), '->set() sets a service ' );
136
136
}
137
137
138
138
public function testSetWithNullResetTheService ()
@@ -154,15 +154,15 @@ public function testGet()
154
154
{
155
155
$ sc = new ProjectServiceContainer ();
156
156
$ sc ->set ('foo ' , $ foo = new \stdClass ());
157
- $ this ->assertEquals ($ foo , $ sc ->get ('foo ' ), '->get() returns the service for the given id ' );
158
- $ this ->assertEquals ($ foo , $ sc ->get ('Foo ' ), '->get() returns the service for the given id, and converts id to lowercase ' );
159
- $ this ->assertEquals ($ sc ->__bar , $ sc ->get ('bar ' ), '->get() returns the service for the given id ' );
160
- $ this ->assertEquals ($ sc ->__foo_bar , $ sc ->get ('foo_bar ' ), '->get() returns the service if a get*Method() is defined ' );
161
- $ this ->assertEquals ($ sc ->__foo_baz , $ sc ->get ('foo.baz ' ), '->get() returns the service if a get*Method() is defined ' );
162
- $ this ->assertEquals ($ sc ->__foo_baz , $ sc ->get ('foo \\baz ' ), '->get() returns the service if a get*Method() is defined ' );
157
+ $ this ->assertSame ($ foo , $ sc ->get ('foo ' ), '->get() returns the service for the given id ' );
158
+ $ this ->assertSame ($ foo , $ sc ->get ('Foo ' ), '->get() returns the service for the given id, and converts id to lowercase ' );
159
+ $ this ->assertSame ($ sc ->__bar , $ sc ->get ('bar ' ), '->get() returns the service for the given id ' );
160
+ $ this ->assertSame ($ sc ->__foo_bar , $ sc ->get ('foo_bar ' ), '->get() returns the service if a get*Method() is defined ' );
161
+ $ this ->assertSame ($ sc ->__foo_baz , $ sc ->get ('foo.baz ' ), '->get() returns the service if a get*Method() is defined ' );
162
+ $ this ->assertSame ($ sc ->__foo_baz , $ sc ->get ('foo \\baz ' ), '->get() returns the service if a get*Method() is defined ' );
163
163
164
164
$ sc ->set ('bar ' , $ bar = new \stdClass ());
165
- $ this ->assertEquals ($ bar , $ sc ->get ('bar ' ), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod() ' );
165
+ $ this ->assertSame ($ bar , $ sc ->get ('bar ' ), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod() ' );
166
166
167
167
try {
168
168
$ sc ->get ('' );
0 commit comments