Skip to content

Commit 06fb3f3

Browse files
committed
[TESTS] Update older unit tests to use \Pimple\Container
1 parent 4b32231 commit 06fb3f3

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

tests/Elasticsearch/Tests/ClientTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function testZeroRetries()
123123

124124
public function testConstructorEmptyPort()
125125
{
126-
$mockPimple = m::mock('Pimple')->shouldReceive('offsetGet')->getMock()->shouldReceive('offsetSet')->getMock();
126+
$mockPimple = m::mock('\Pimple\Container')->shouldReceive('offsetGet')->getMock()->shouldReceive('offsetSet')->getMock();
127127
$mockDIC = m::mock('DICBuilder')->shouldReceive('getDIC')->once()->andReturn($mockPimple)->getMock();
128128

129129
$that = $this; //hurp durp
@@ -143,7 +143,7 @@ public function testConstructorEmptyPort()
143143

144144
public function testConstructorNoPort()
145145
{
146-
$mockPimple = m::mock('Pimple')->shouldReceive('offsetGet')->getMock()->shouldReceive('offsetSet')->getMock();
146+
$mockPimple = m::mock('\Pimple\Container')->shouldReceive('offsetGet')->getMock()->shouldReceive('offsetSet')->getMock();
147147
$mockDIC = m::mock('DICBuilder')->shouldReceive('getDIC')->once()->andReturn($mockPimple)->getMock();
148148

149149
$that = $this; //hurp durp
@@ -163,7 +163,7 @@ public function testConstructorNoPort()
163163

164164
public function testConstructorWithPort()
165165
{
166-
$mockPimple = m::mock('Pimple')->shouldReceive('offsetGet')->getMock()->shouldReceive('offsetSet')->getMock();
166+
$mockPimple = m::mock('\Pimple\Container')->shouldReceive('offsetGet')->getMock()->shouldReceive('offsetSet')->getMock();
167167
$mockDIC = m::mock('DICBuilder')->shouldReceive('getDIC')->once()->andReturn($mockPimple)->getMock();
168168

169169
$that = $this; //hurp durp
@@ -183,7 +183,7 @@ public function testConstructorWithPort()
183183

184184
public function testConstructorWithSchemeAndPort()
185185
{
186-
$mockPimple = m::mock('Pimple')->shouldReceive('offsetGet')->getMock()->shouldReceive('offsetSet')->getMock();
186+
$mockPimple = m::mock('\Pimple\Container')->shouldReceive('offsetGet')->getMock()->shouldReceive('offsetSet')->getMock();
187187
$mockDIC = m::mock('DICBuilder')->shouldReceive('getDIC')->once()->andReturn($mockPimple)->getMock();
188188

189189
$that = $this; //hurp durp

tests/Elasticsearch/Tests/Connections/ConnectionFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function testCreate()
2929
};
3030

3131
// Eww...
32-
$mockPimple = m::mock('Pimple')
32+
$mockPimple = m::mock('\Pimple\Container')
3333
->shouldReceive('offsetGet')->with('connection')->andReturn($mockFunction)->getMock()
3434
->shouldReceive('offsetGet')->with('connectionParamsShared')->andReturn(array())->getMock()
3535
->shouldReceive('offsetGet')->with('logObject')->andReturn(array())->getMock()

tests/Elasticsearch/Tests/TransportTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testSniffOnStart()
6868
};
6969

7070
// Eww...
71-
$params = m::mock('Pimple')
71+
$params = m::mock('\Pimple\Container')
7272
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
7373
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
7474
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()
@@ -103,7 +103,7 @@ public function testSetRetries()
103103
};
104104

105105
// Eww...
106-
$params = m::mock('Pimple')
106+
$params = m::mock('\Pimple\Container')
107107
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
108108
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
109109
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()
@@ -136,7 +136,7 @@ public function testNoSniffOnStart()
136136
};
137137

138138
// Eww...
139-
$params = m::mock('Pimple')
139+
$params = m::mock('\Pimple\Container')
140140
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
141141
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
142142
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()
@@ -170,7 +170,7 @@ public function testMixedHosts()
170170
};
171171

172172
// Eww...
173-
$params = m::mock('Pimple')
173+
$params = m::mock('\Pimple\Container')
174174
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
175175
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
176176
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()
@@ -220,7 +220,7 @@ public function testPerformRequestNoBody()
220220

221221

222222
// Eww...
223-
$pimple = m::mock('Pimple')
223+
$pimple = m::mock('\Pimple\Container')
224224
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
225225
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
226226
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()
@@ -283,7 +283,7 @@ public function testPerformRequestWithBody()
283283

284284

285285
// Eww...
286-
$pimple = m::mock('Pimple')
286+
$pimple = m::mock('\Pimple\Container')
287287
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
288288
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
289289
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()
@@ -343,7 +343,7 @@ public function testPerformRequestTimeout()
343343

344344

345345
// Eww...
346-
$pimple = m::mock('Pimple')
346+
$pimple = m::mock('\Pimple\Container')
347347
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
348348
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
349349
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()
@@ -400,7 +400,7 @@ public function testPerformRequestNoNodesAvailable()
400400
$mockSerializer = m::mock('\Elasticsearch\Serializers\SerializerInterface');
401401

402402
// Eww...
403-
$pimple = m::mock('Pimple')
403+
$pimple = m::mock('\Pimple\Container')
404404
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
405405
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()
406406
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
@@ -455,7 +455,7 @@ public function testPerformRequestTransportException()
455455

456456

457457
// Eww...
458-
$pimple = m::mock('Pimple')
458+
$pimple = m::mock('\Pimple\Container')
459459
->shouldReceive('offsetGet')->with('connectionPool')->andReturn($mockConnectionPoolFxn)->getMock()
460460
->shouldReceive('offsetGet')->with('serializer')->andReturn($mockSerializer)->getMock()
461461
->shouldReceive('offsetGet')->with('connection')->andReturn($mockConnectionFxn)->getMock()

0 commit comments

Comments
 (0)