public function testBuild()
 {
     $type = $this->getImporterTypeMock();
     $import = new Import();
     $handler = $this->getHandlerMock();
     $importer = $this->builder->build($type, $import, $handler, []);
     $this->assertInstanceOf(Importer::class, $importer);
 }
 public function testBuild()
 {
     $type = $this->getImporterTypeMock();
     $import = new Import();
     $handler = $this->getHandlerMock();
     $logger = $this->getLoggerMock();
     $importer = $this->builder->build($type, $import, $handler, $logger, []);
     $this->assertInstanceOf('FM\\IoBundle\\Import\\Importer', $importer);
 }
 public function testBuild()
 {
     $options = ['parse' => ['files_for_parse' => [1, 2, 3]], 'write' => ['report_filename' => 'some_filename']];
     $parseResult = ['foo', 'bar', 'baz'];
     $configMock = $this->getMock('\\Magento\\Setup\\Module\\Dependency\\Report\\Data\\ConfigInterface');
     $this->dependenciesParserMock->expects($this->once())->method('parse')->with($options['parse'])->will($this->returnValue($parseResult));
     $this->builder->expects($this->once())->method('buildData')->with($parseResult)->will($this->returnValue($configMock));
     $this->reportWriterMock->expects($this->once())->method('write')->with($options['write'], $configMock);
     $this->builder->build($options);
 }
 /**
  * @test
  */
 public function buildSetsDefaultActionNameIfSpecifiedActionIsNotAllowedAndCallDefaultActionIfActionCantBeResolvedIsSet()
 {
     $this->configuration['mvc']['callDefaultActionIfActionCantBeResolved'] = 1;
     $this->injectDependencies();
     $this->requestBuilder->_set('extensionService', $this->mockExtensionService);
     $_GET = array('tx_myextension_pi1' => array('controller' => 'TheThirdController', 'action' => 'someInvalidAction'));
     $this->mockRequest->expects($this->once())->method('setControllerName')->with('TheThirdController');
     $this->mockRequest->expects($this->once())->method('setControllerActionName')->with('delete');
     $this->requestBuilder->build();
 }