public function handle(QueryInterface $query) { $files = $this->getFiles($query->getFiles()); return $this->phpFilesExtractor->extract(new FilesCollection($files)); }
/** * @test */ public function itShouldReturnArrayPhpFilesResponse() { $files = $this->phpFilesExtractorQueryHandler->handle(new PhpFilesExtractorQuery(FilesCommittedStub::createAllFiles())); $this->assertInstanceOf(PhpFilesResponse::class, $files); $this->assertSame(5, count($files->getFiles())); }