Example #1
0
 public function testAllowsToDefineDefaultValues()
 {
     $this->application->command('greet [firstname] [lastname]', function ($firstname, $lastname, Outputinterface $output) {
     });
     $this->application->defaults('greet', ['firstname' => 'John', 'lastname' => 'Doe']);
     $definition = $this->application->get('greet')->getDefinition();
     $this->assertEquals('John', $definition->getArgument('firstname')->getDefault());
     $this->assertEquals('Doe', $definition->getArgument('lastname')->getDefault());
 }