Bläddra i källkod

Downgrading phpunit for support for earlier PHP versions

Jonny Wenmoth 9 år sedan
förälder
incheckning
9f5e81f0bd

+ 1 - 1
composer.json

@@ -22,7 +22,7 @@
         "jakoch/phantomjs-installer": "2.1.1"
     },
     "require-dev": {
-        "phpunit/phpunit": "~5.0",
+        "phpunit/phpunit": "~4.0",
         "zendframework/zendpdf": "~2.0",
         "smalot/pdfparser": "~0.9"
     },

+ 2 - 2
src/JonnyW/PhantomJs/Http/AbstractRequest.php

@@ -374,7 +374,7 @@ abstract class AbstractRequest
      * Get request headers
      *
      * @access public
-     * @param  string $format
+     * @param  string       $format
      * @return array|string
      */
     public function getHeaders($format = 'default')
@@ -404,7 +404,7 @@ abstract class AbstractRequest
      * Get body styles
      *
      * @access public
-     * @param  string $format (default: 'default')
+     * @param  string       $format (default: 'default')
      * @return array|string
      */
     public function getBodyStyles($format = 'default')

+ 2 - 2
src/JonnyW/PhantomJs/Tests/Integration/ClientTest.php

@@ -482,7 +482,7 @@ EOF;
         $this->assertEquals(30, $pdfWidth);
         $this->assertEquals(21, $pdfHeight);
     }
-    
+
     /**
      * Test can set repeating header
      * for PDF request
@@ -518,7 +518,7 @@ EOF;
 
         $this->assertContains('Header', $text);
     }
-    
+
     /**
      * Test can set repeating footer
      * for PDF request

+ 3 - 3
src/JonnyW/PhantomJs/Tests/Integration/Procedure/ProcedureCompilerTest.php

@@ -60,7 +60,7 @@ class ProcedureCompilerTest extends \PHPUnit_Framework_TestCase
         $request = $this->getRequest();
         $request->setUrl('http://test.com');
 
-        $renderer = $this->createMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
+        $renderer = $this->getMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
         $renderer->expects($this->exactly(1))
             ->method('render')
             ->will($this->returnValue('var test=1; phantom.exit(1);'));
@@ -94,7 +94,7 @@ class ProcedureCompilerTest extends \PHPUnit_Framework_TestCase
         $request = $this->getRequest();
         $request->setUrl('http://test.com');
 
-        $renderer = $this->createMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
+        $renderer = $this->getMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
         $renderer->expects($this->exactly(2))
             ->method('render')
             ->will($this->returnValue('var test=1; phantom.exit(1);'));
@@ -127,7 +127,7 @@ class ProcedureCompilerTest extends \PHPUnit_Framework_TestCase
         $request = $this->getRequest();
         $request->setUrl('http://test.com');
 
-        $renderer = $this->createMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
+        $renderer = $this->getMock('\JonnyW\PhantomJs\Template\TemplateRendererInterface');
         $renderer->expects($this->exactly(2))
             ->method('render')
             ->will($this->returnValue('var test=1; phantom.exit(1);'));

+ 4 - 4
src/JonnyW/PhantomJs/Tests/Unit/ClientTest.php

@@ -121,7 +121,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
      */
     protected function getEngine()
     {
-        $engine = $this->createMock('\JonnyW\PhantomJs\Engine');
+        $engine = $this->getMock('\JonnyW\PhantomJs\Engine');
 
         return $engine;
     }
@@ -134,7 +134,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
      */
     protected function getMessageFactory()
     {
-        $messageFactory = $this->createMock('\JonnyW\PhantomJs\Http\MessageFactoryInterface');
+        $messageFactory = $this->getMock('\JonnyW\PhantomJs\Http\MessageFactoryInterface');
 
         return $messageFactory;
     }
@@ -147,7 +147,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
      */
     protected function getProcedureLoader()
     {
-        $procedureLoader = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface');
+        $procedureLoader = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface');
 
         return $procedureLoader;
     }
@@ -160,7 +160,7 @@ class ClientTest extends \PHPUnit_Framework_TestCase
      */
     protected function getProcedureCompiler()
     {
-        $procedureCompiler = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureCompilerInterface');
+        $procedureCompiler = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureCompilerInterface');
 
         return $procedureCompiler;
     }

+ 2 - 2
src/JonnyW/PhantomJs/Tests/Unit/Procedure/ChainProcedureLoaderTest.php

@@ -153,7 +153,7 @@ class ChainProcedureLoaderTest extends \PHPUnit_Framework_TestCase
      */
     protected function getProcedureLoader()
     {
-        $procedureLoader = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface');
+        $procedureLoader = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface');
 
         return $procedureLoader;
     }
@@ -166,7 +166,7 @@ class ChainProcedureLoaderTest extends \PHPUnit_Framework_TestCase
      */
     protected function getProcedure()
     {
-        $procedure = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureInterface');
+        $procedure = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureInterface');
 
         return $procedure;
     }

+ 1 - 1
src/JonnyW/PhantomJs/Tests/Unit/Procedure/ProcedureLoaderFactoryTest.php

@@ -93,7 +93,7 @@ class ProcedureLoaderFactoryTest extends \PHPUnit_Framework_TestCase
      */
     protected function getProcedureFactory()
     {
-        $procedureFactory = $this->createMock('\JonnyW\PhantomJs\Procedure\ProcedureFactoryInterface');
+        $procedureFactory = $this->getMock('\JonnyW\PhantomJs\Procedure\ProcedureFactoryInterface');
 
         return $procedureFactory;
     }

+ 1 - 1
src/JonnyW/PhantomJs/Tests/Unit/Procedure/ProcedureLoaderTest.php

@@ -268,7 +268,7 @@ class ProcedureLoaderTest extends \PHPUnit_Framework_TestCase
      */
     protected function getFileLocator()
     {
-        $fileLocator = $this->createMock('\Symfony\Component\Config\FileLocatorInterface');
+        $fileLocator = $this->getMock('\Symfony\Component\Config\FileLocatorInterface');
 
         return $fileLocator;
     }

+ 1 - 1
src/JonnyW/PhantomJs/Tests/Unit/Procedure/ProcedureTest.php

@@ -232,7 +232,7 @@ class ProcedureTest extends \PHPUnit_Framework_TestCase
      */
     protected function getEngine()
     {
-        $engine = $this->createMock('\JonnyW\PhantomJs\Engine');
+        $engine = $this->getMock('\JonnyW\PhantomJs\Engine');
 
         return $engine;
     }