/** * test protected _validateData() */ public function testValidateData() { $sourceClassName = 'Magento_Module_Controller_Index'; $resultClassName = 'Magento_Module_Controller'; $repository = new Repository(); $repository->init($sourceClassName, $resultClassName); $this->assertFalse($repository->generate()); }
/** * test protected _validateData() */ public function testValidateData() { $sourceClassName = 'Magento_Module_Controller_Index'; $resultClassName = 'Magento_Module_Controller'; $includePathMock = $this->getMockBuilder('Magento\\Framework\\Autoload\\IncludePath')->disableOriginalConstructor()->setMethods(['getFile'])->getMock(); $includePathMock->expects($this->at(0))->method('getFile')->with($sourceClassName)->will($this->returnValue(true)); $includePathMock->expects($this->at(1))->method('getFile')->with($resultClassName)->will($this->returnValue(false)); $repository = new Repository(null, null, null, null, $includePathMock); $repository->init($sourceClassName, $resultClassName); $this->assertFalse($repository->generate()); }