You are here

public function ApplicationTest::testFindCommandEqualNamespace in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/ApplicationTest.php \Symfony\Component\Console\Tests\ApplicationTest::testFindCommandEqualNamespace()

File

vendor/symfony/console/Tests/ApplicationTest.php, line 287

Class

ApplicationTest

Namespace

Symfony\Component\Console\Tests

Code

public function testFindCommandEqualNamespace() {
  $application = new Application();
  $application
    ->add(new \Foo3Command());
  $application
    ->add(new \Foo4Command());
  $this
    ->assertInstanceOf('Foo3Command', $application
    ->find('foo3:bar'), '->find() returns the good command even if a namespace has same name');
  $this
    ->assertInstanceOf('Foo4Command', $application
    ->find('foo3:bar:toh'), '->find() returns a command even if its namespace equals another command name');
}