application = new Application(); $command = new MappingDescribeCommand(); $this->application->setHelperSet(new HelperSet( [ 'em' => new EntityManagerHelper($this->_em) ] )); $this->application->add($command); $this->command = $this->application->find('orm:mapping:describe'); $this->tester = new CommandTester($command); } public function testShowSpecificFuzzySingle() { $this->tester->execute( [ 'command' => $this->command->getName(), 'entityName' => 'AttractionInfo', ] ); $display = $this->tester->getDisplay(); $this->assertContains(AttractionInfo::class, $display); $this->assertContains('Root entity name', $display); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage possible matches */ public function testShowSpecificFuzzyAmbiguous() { $this->tester->execute( [ 'command' => $this->command->getName(), 'entityName' => 'Attraction', ] ); } /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Could not find any mapped Entity classes matching "AttractionFooBar" */ public function testShowSpecificNotFound() { $this->tester->execute( [ 'command' => $this->command->getName(), 'entityName' => 'AttractionFooBar' ] ); } }