You are here

public function ApplicationTest::testFindNamespace in Zircon Profile 8.0

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

File

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

Class

ApplicationTest

Namespace

Symfony\Component\Console\Tests

Code

public function testFindNamespace() {
  $application = new Application();
  $application
    ->add(new \FooCommand());
  $this
    ->assertEquals('foo', $application
    ->findNamespace('foo'), '->findNamespace() returns the given namespace if it exists');
  $this
    ->assertEquals('foo', $application
    ->findNamespace('f'), '->findNamespace() finds a namespace given an abbreviation');
  $application
    ->add(new \Foo2Command());
  $this
    ->assertEquals('foo', $application
    ->findNamespace('foo'), '->findNamespace() returns the given namespace if it exists');
}