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