Skip to content

Commit 467b0b5

Browse files
author
Bibu Mathew
committed
MAGETWO-31968: PHP Fatal error: Call to a member function addStreamLog() on a non-object
- Fixed unit test
1 parent cb05e58 commit 467b0b5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dev/tests/unit/testsuite/Magento/Framework/Image/Adapter/AbstractTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ class AbstractTest extends \PHPUnit_Framework_TestCase
2525
*/
2626
protected $filesystemMock;
2727

28+
/**
29+
* @var \PHPUnit_Framework_MockObject_MockObject |\Psr\Log\LoggerInterface
30+
*/
31+
protected $loggerMock;
32+
2833
protected function setUp()
2934
{
3035
$this->directoryWriteMock = $this->getMock(
@@ -48,10 +53,11 @@ protected function setUp()
4853
)->will(
4954
$this->returnValue($this->directoryWriteMock)
5055
);
56+
$this->loggerMock = $this->getMockBuilder( 'Psr\Log\LoggerInterface')->getMock();
5157

5258
$this->_model = $this->getMockForAbstractClass(
5359
'Magento\Framework\Image\Adapter\AbstractAdapter',
54-
[$this->filesystemMock]
60+
[$this->filesystemMock,$this->loggerMock]
5561
);
5662
}
5763

@@ -60,6 +66,7 @@ protected function tearDown()
6066
$this->directoryWriteMock = null;
6167
$this->_model = null;
6268
$this->filesystemMock = null;
69+
$this->loggerMock = null;
6370
}
6471

6572
/**

0 commit comments

Comments
 (0)