Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci warning caused by PHPUnit Api deprecation #373

Merged
merged 1 commit into from
Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Tests/CommandTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract class CommandTestCase extends \PHPUnit_Framework_TestCase
*/
public function setUp()
{
$this->container = $this->getMock('\\Symfony\\Component\\DependencyInjection\\ContainerInterface');
$this->container = $this->getMockBuilder('\\Symfony\\Component\\DependencyInjection\\ContainerInterface')->getMock();

$kernel = $this->getMockBuilder('\\Symfony\\Component\\HttpKernel\\Kernel')
->disableOriginalConstructor()
Expand All @@ -60,7 +60,7 @@ public function setUp()
->will($this->returnValue($this->container));
$this->application = new Application($kernel);

$this->predisClient = $this->getMock('\\Predis\\Client');
$this->predisClient = $this->getMockBuilder('\\Predis\\Client')->getMock();

$this->phpredisClient = $this->getMockBuilder('PhpredisClient')
->disableOriginalConstructor()
Expand All @@ -73,7 +73,7 @@ public function setUp()

protected function registerPredisClient()
{
$this->predisClient = $this->getMock('\\Predis\\Client');
$this->predisClient = $this->getMockBuilder('\\Predis\\Client')->getMock();

$this->container->expects($this->once())
->method('get')
Expand Down
4 changes: 2 additions & 2 deletions Tests/Logger/RedisLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private function setUpWithPsrLogger()
$this->markTestSkipped('PSR-3 logger package is not installed.');
}

$this->logger = $this->getMock('Psr\Log\LoggerInterface');
$this->logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock();
$this->redisLogger = new RedisLogger($this->logger);
}

Expand All @@ -34,7 +34,7 @@ private function setUpWithHttpKernelLogger()
$this->markTestSkipped('The Symfony LoggerInterface is not available as Symfony 3+ is installed.');
}

$this->logger = $this->getMock('Symfony\Component\HttpKernel\Log\LoggerInterface');
$this->logger = $this->getMockBuilder('Symfony\Component\HttpKernel\Log\LoggerInterface')->getMock();
$this->redisLogger = new RedisLogger($this->logger);
}

Expand Down
5 changes: 4 additions & 1 deletion Tests/Session/Storage/Handler/RedisSessionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ class RedisSessionHandlerTest extends \PHPUnit_Framework_TestCase

protected function setUp()
{
$this->redis = $this->getMock('Predis\Client', array('get', 'set', 'setex', 'del'));
$this->redis = $this
->getMockBuilder('Predis\Client')
->setMethods(array('get', 'set', 'setex', 'del'))
->getMock();
}

protected function tearDown()
Expand Down