skip to Main Content

Magento2 unit test for block file for admin grid extending MagentoBackendBlockWidgetGridExtended is giving error "Error: Call to a member function getDirectoryWrite() on null"

added below mocks, still error continues.

$this->_filesystem = $this->createMock(Filesystem::class);
$this->_directory = $this->createMock(DirectoryWrite::class);
$this->_filesystem->method('getDirectoryWrite')->willReturn($this->_directory);

Can anyone help here?


Please signup or login to give your own answer.
Back To Top
Search