Skip to content
Snippets Groups Projects
Commit 491bbb67 authored by Demian Katz's avatar Demian Katz Committed by Robert Lange
Browse files

Update tests for forward-compatibility with PHPUnit 7.

parent 3d01e5e7
No related merge requests found
...@@ -58,7 +58,7 @@ trait AutoRetryTrait ...@@ -58,7 +58,7 @@ trait AutoRetryTrait
* *
* @return void * @return void
*/ */
public function runBare() public function runBare(): void
{ {
// Fetch retry count from annotations, but make sure it's a sane number; // Fetch retry count from annotations, but make sure it's a sane number;
// default to a single attempt with no retries unless told otherwise. // default to a single attempt with no retries unless told otherwise.
......
...@@ -48,13 +48,13 @@ class CacheDecoratorTest extends \PHPUnit\Framework\TestCase ...@@ -48,13 +48,13 @@ class CacheDecoratorTest extends \PHPUnit\Framework\TestCase
*/ */
public function testFromFileAndString() public function testFromFileAndString()
{ {
$cache = $this->getMockForAbstractClass('Zend\Cache\Storage\StorageInterface', ['setItem', 'hasItem']); $cache = $this->getMockForAbstractClass('Zend\Cache\Storage\StorageInterface');
$cache->expects($this->exactly(2)) $cache->expects($this->exactly(2))
->method('setItem'); ->method('setItem');
$cache->expects($this->exactly(2)) $cache->expects($this->exactly(2))
->method('hasItem') ->method('hasItem')
->will($this->returnValue(false)); ->will($this->returnValue(false));
$reader = $this->getMockForAbstractClass('Zend\Config\Reader\ReaderInterface', ['fromFile', 'fromString']); $reader = $this->getMockForAbstractClass('Zend\Config\Reader\ReaderInterface');
$reader->expects($this->once()) $reader->expects($this->once())
->method('fromFile') ->method('fromFile')
->will($this->returnValue([])); ->will($this->returnValue([]));
...@@ -73,7 +73,7 @@ class CacheDecoratorTest extends \PHPUnit\Framework\TestCase ...@@ -73,7 +73,7 @@ class CacheDecoratorTest extends \PHPUnit\Framework\TestCase
*/ */
public function testFromFileAndStringCached() public function testFromFileAndStringCached()
{ {
$cache = $this->getMockForAbstractClass('Zend\Cache\Storage\StorageInterface', ['setItem', 'hasItem', 'getItem']); $cache = $this->getMockForAbstractClass('Zend\Cache\Storage\StorageInterface');
$cache->expects($this->never()) $cache->expects($this->never())
->method('setItem'); ->method('setItem');
$cache->expects($this->exactly(2)) $cache->expects($this->exactly(2))
...@@ -82,7 +82,7 @@ class CacheDecoratorTest extends \PHPUnit\Framework\TestCase ...@@ -82,7 +82,7 @@ class CacheDecoratorTest extends \PHPUnit\Framework\TestCase
$cache->expects($this->exactly(2)) $cache->expects($this->exactly(2))
->method('getItem') ->method('getItem')
->will($this->returnValue([])); ->will($this->returnValue([]));
$reader = $this->getMockForAbstractClass('Zend\Config\Reader\ReaderInterface', ['fromFile', 'fromString']); $reader = $this->getMockForAbstractClass('Zend\Config\Reader\ReaderInterface');
$deco = new CacheDecorator($reader, $cache); $deco = new CacheDecorator($reader, $cache);
$deco->fromFile('ignore'); $deco->fromFile('ignore');
$deco->fromString('ignore'); $deco->fromString('ignore');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment