@@ -144,7 +144,7 @@ public function testSet()
144
144
{
145
145
$ sc = new Container ();
146
146
$ 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 ' );
148
148
}
149
149
150
150
public function testSetWithNullResetTheService ()
@@ -166,14 +166,14 @@ public function testGet()
166
166
{
167
167
$ sc = new ProjectServiceContainer ();
168
168
$ 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 ' );
174
174
175
175
$ 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() ' );
177
177
178
178
try {
179
179
$ sc ->get ('' );
@@ -196,15 +196,15 @@ public function testLegacyGet()
196
196
$ sc = new LegacyProjectServiceContainer ();
197
197
$ sc ->set ('foo ' , $ foo = new \stdClass ());
198
198
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
F438
code>
- $ 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