Skip to content

Commit 9f5e81f

Browse files
committed
Downgrading phpunit for support for earlier PHP versions
1 parent 486144a commit 9f5e81f

9 files changed

+17
-17
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"jakoch/phantomjs-installer": "2.1.1"
2323
},
2424
"require-dev": {
25-
"phpunit/phpunit": "~5.0",
25+
"phpunit/phpunit": "~4.0",
2626
"zendframework/zendpdf": "~2.0",
2727
"smalot/pdfparser": "~0.9"
2828
},

src/JonnyW/PhantomJs/Http/AbstractRequest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public function addHeaders(array $headers)
374374
* Get request headers
375375
*
376376
* @access public
377-
* @param string $format
377+
* @param string $format
378378
* @return array|string
379379
*/
380380
public function getHeaders($format = 'default')
@@ -404,7 +404,7 @@ public function setBodyStyles(array $styles)
404404
* Get body styles
405405
*
406406
* @access public
407-
* @param string $format (default: 'default')
407+
* @param string $format (default: 'default')
408408
* @return array|string
409409
*/
410410
public function getBodyStyles($format = 'default')

src/JonnyW/PhantomJs/Tests/Integration/ClientTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ public function testPdfRequestSavesFileToDiskWithCorrectOrientation()
482482
$this->assertEquals(30, $pdfWidth);
483483
$this->assertEquals(21, $pdfHeight);
484484
}
485-
485+
486486
/**
487487
* Test can set repeating header
488488
* for PDF request
@@ -518,7 +518,7 @@ public function testCanSetRepeatingHeaderForPDFRequest()
518518

519519
$this->assertContains('Header', $text);
520520
}
521-
521+
522522
/**
523523
* Test can set repeating footer
524524
* for PDF request

src/JonnyW/PhantomJs/Tests/Integration/Procedure/ProcedureCompilerTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function testProcedureIsLoadedFromCacheIfCacheIsEnabled()
6060
$request = $this->getRequest();
6161
$request->setUrl('http://test.com');
6262

63-
$renderer = $this->createMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
63+
$renderer = $this->getMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
6464
$renderer->expects($this->exactly(1))
6565
->method('render')
6666
->will($this->returnValue('var test=1; phantom.exit(1);'));
@@ -94,7 +94,7 @@ public function testProcedureIsNotLoadedFromCacheIfCacheIsDisabled()
9494
$request = $this->getRequest();
9595
$request->setUrl('http://test.com');
9696

97-
$renderer = $this->createMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
97+
$renderer = $this->getMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
9898
$renderer->expects($this->exactly(2))
9999
->method('render')
100100
->will($this->returnValue('var test=1; phantom.exit(1);'));
@@ -127,7 +127,7 @@ public function testProcedureCacheCanBeCleared()
127127
$request = $this->getRequest();
128128
$request->setUrl('http://test.com');
129129

130-
$renderer = $this->createMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
130+
$renderer = $this->getMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
131131
$renderer->expects($this->exactly(2))
132132
->method('render')
133133
->will($this->returnValue('var test=1; phantom.exit(1);'));

src/JonnyW/PhantomJs/Tests/Unit/ClientTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected function getClient(Engine $engine, ProcedureLoaderInterface $procedure
121121
*/
122122
protected function getEngine()
123123
{
124-
$engine = $this->createMock('\JonnyW\PhantomJs\Engine');
124+
$engine = $this->getMock('\JonnyW\PhantomJs\Engine');
125125

126126
return $engine;
127127
}
@@ -134,7 +134,7 @@ protected function getEngine()
134134
*/
135135
protected function getMessageFactory()
136136
{
137-
$messageFactory = $this->createMock('\JonnyW\PhantomJs\Http\MessageFactoryInterface');
137+
$messageFactory = $this->getMock('\JonnyW\PhantomJs\Http\MessageFactoryInterface');
138138

139139
return $messageFactory;
140140
}
@@ -147,7 +147,7 @@ protected function getMessageFactory()
147147
*/
148148
protected function getProcedureLoader()
149149
{
150-
$procedureLoader = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface');
150+
$procedureLoader = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface');
151151

152152
return $procedureLoader;
153153
}
@@ -160,7 +160,7 @@ protected function getProcedureLoader()
160160
*/
161161
protected function getProcedureCompiler()
162162
{
163-
$procedureCompiler = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureCompilerInterface');
163+
$procedureCompiler = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureCompilerInterface');
164164

165165
return $procedureCompiler;
166166
}

src/JonnyW/PhantomJs/Tests/Unit/Procedure/ChainProcedureLoaderTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function getChainProcedureLoader(array $procedureLoaders)
153153
*/
154154
protected function getProcedureLoader()
155155
{
156-
$procedureLoader = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface');
156+
$procedureLoader = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface');
157157

158158
return $procedureLoader;
159159
}
@@ -166,7 +166,7 @@ protected function getProcedureLoader()
166166
*/
167167
protected function getProcedure()
168168
{
169-
$procedure = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureInterface');
169+
$procedure = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureInterface');
170170

171171
return $procedure;
172172
}

src/JonnyW/PhantomJs/Tests/Unit/Procedure/ProcedureLoaderFactoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function getProcedureLoaderFactory(ProcedureFactoryInterface $procedur
9393
*/
9494
protected function getProcedureFactory()
9595
{
96-
$procedureFactory = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureFactoryInterface');
96+
$procedureFactory = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureFactoryInterface');
9797

9898
return $procedureFactory;
9999
}

src/JonnyW/PhantomJs/Tests/Unit/Procedure/ProcedureLoaderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ protected function getRenderer()
268268
*/
269269
protected function getFileLocator()
270270
{
271-
$fileLocator = $this->createMock('\Symfony\Component\Config\FileLocatorInterface');
271+
$fileLocator = $this->getMock('\Symfony\Component\Config\FileLocatorInterface');
272272

273273
return $fileLocator;
274274
}

src/JonnyW/PhantomJs/Tests/Unit/Procedure/ProcedureTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ protected function getOutput()
232232
*/
233233
protected function getEngine()
234234
{
235-
$engine = $this->createMock('\JonnyW\PhantomJs\Engine');
235+
$engine = $this->getMock('\JonnyW\PhantomJs\Engine');
236236

237237
return $engine;
238238
}

0 commit comments

Comments
 (0)