test: rename getMock() to mock()

This commit is contained in:
Khoubza Younes
2023-01-23 00:20:15 +01:00
parent 366787eb80
commit 48177d6a9c
2 changed files with 4 additions and 4 deletions
@@ -18,7 +18,7 @@ class FlasherContainerTest extends TestCase
public function testInit()
{
$this->setProperty('Flasher\Prime\Container\FlasherContainer', 'instance', null);
$container = $this->getMock('Flasher\Prime\Container\ContainerInterface');
$container = $this->mock('Flasher\Prime\Container\ContainerInterface');
FlasherContainer::init($container);
@@ -34,10 +34,10 @@ class FlasherContainerTest extends TestCase
{
$this->setProperty('Flasher\Prime\Container\FlasherContainer', 'instance', null);
$container = $this->getMock('Flasher\Prime\Container\ContainerInterface');
$container = $this->mock('Flasher\Prime\Container\ContainerInterface');
$container
->method('get')
->willreturn($this->getMock('Flasher\Prime\FlasherInterface'));
->willreturn($this->mock('Flasher\Prime\FlasherInterface'));
FlasherContainer::init($container);
+1 -1
View File
@@ -107,7 +107,7 @@ class TestCase extends \PHPUnit\Framework\TestCase
*
* @return MockObject
*/
protected function getMock($className)
protected function mock($className)
{
return $this->getMockBuilder($className)->getMock();
}