You are here

public function ApplicationTest::testConstructor 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::testConstructor()

File

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

Class

ApplicationTest

Namespace

Symfony\Component\Console\Tests

Code

public function testConstructor() {
  $application = new Application('foo', 'bar');
  $this
    ->assertEquals('foo', $application
    ->getName(), '__construct() takes the application name as its first argument');
  $this
    ->assertEquals('bar', $application
    ->getVersion(), '__construct() takes the application version as its second argument');
  $this
    ->assertEquals(array(
    'help',
    'list',
  ), array_keys($application
    ->all()), '__construct() registered the help and list commands by default');
}