/** * Processes operation task * * @return void */ public function doOperation() { $files = $this->configurationScanner->scan('extension_attributes.xml'); $repositories = $this->serviceDataAttributesScanner->collectEntities($files); foreach ($repositories as $entityName) { class_exists($entityName); } }
/** * Processes operation task * * @return void */ public function doOperation() { $files = $this->configurationScanner->scan('di.xml'); $proxies = $this->proxyScanner->collectEntities($files); foreach ($proxies as $entityName) { class_exists($entityName); } }
public function testScan() { $codes = ['code1', 'code2']; $iteratorMock = $this->getMockBuilder('Magento\\Framework\\Config\\FileIterator')->disableOriginalConstructor()->getMock(); $this->areaListMock->expects($this->once())->method('getCodes')->willReturn($codes); $counts = count($codes) + 2; $this->fileResolverMock->expects($this->exactly($counts))->method('get')->willReturn($iteratorMock); $files = ['file1' => 'onefile', 'file2' => 'anotherfile']; $iteratorMock->expects($this->exactly($counts))->method('toArray')->willReturn($files); $this->assertEquals(array_keys($files), $this->model->scan('di.xml')); }
/** * Processes operation task * * @return void */ public function doOperation() { foreach ($this->data['paths'] as $path) { $this->classesScanner->getList($path); } $this->repositoryScanner->setUseAutoload(false); $files = $this->configurationScanner->scan('di.xml'); $repositories = $this->repositoryScanner->collectEntities($files); foreach ($repositories as $entityName) { class_exists($entityName); } }