10 class DirTest extends \PHPUnit\Framework\TestCase
24 $this->moduleRegistryMock = $this->createMock(\
Magento\Framework\Component\ComponentRegistrarInterface::class);
26 $this->_model = new \Magento\Framework\Module\Dir($this->moduleRegistryMock);
31 $this->moduleRegistryMock->expects($this->once())
34 ->will($this->returnValue(
'/Test/Module'));
36 $this->assertEquals(
'/Test/Module', $this->_model->getDir(
'Test_Module'));
41 $this->moduleRegistryMock->expects($this->once())
44 ->will($this->returnValue(
'/Test/Module'));
46 $this->assertEquals(
'/Test/Module/etc', $this->_model->getDir(
'Test_Module',
'etc'));
51 $this->moduleRegistryMock->expects($this->once())
54 ->willReturn(
'/Test/Module');
56 $this->assertEquals(
'/Test/Module/Setup', $this->_model->getDir(
'Test_Module',
'Setup'));
65 $this->moduleRegistryMock->expects($this->once())
68 ->will($this->returnValue(
'/Test/Module'));
70 $this->_model->getDir(
'Test_Module',
'unknown');
79 $this->moduleRegistryMock->expects($this->once())
83 $this->_model->getDir(
'Test Module');
testGetDirModuleIncorrectlyRegistered()
testGetDirModuleSubDirUnknown()