application = new Application(); $command = new InfoCommand(); $this->application->setHelperSet( new HelperSet(['em' => new EntityManagerHelper($this->_em)]) ); $this->application->add($command); $this->command = $this->application->find('orm:info'); $this->tester = new CommandTester($command); } public function testListAllClasses() { $this->tester->execute(['command' => $this->command->getName()]); $this->assertContains(AttractionInfo::class, $this->tester->getDisplay()); $this->assertContains(City::class, $this->tester->getDisplay()); } }