Skip to content

Commit df17996

Browse files
committed
changed some PHPUnit assertions to more specific ones
1 parent 7613bbd commit df17996

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/ApplicationTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ public function testAll()
9797
{
9898
$application = new Application();
9999
$commands = $application->all();
100-
$this->assertEquals('Symfony\\Component\\Console\\Command\\HelpCommand', get_class($commands['help']), '->all() returns the registered commands');
100+
$this->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands');
101101

102102
$application->add(new \FooCommand());
103103
$commands = $application->all('foo');
104-
$this->assertEquals(1, count($commands), '->all() takes a namespace as its first argument');
104+
$this->assertCount(1, $commands, '->all() takes a namespace as its first argument');
105105
}
106106

107107
public function testRegister()
@@ -481,8 +481,8 @@ public function testRun()
481481
$application->run();
482482
ob_end_clean();
483483

484-
$this->assertSame('Symfony\Component\Console\Input\ArgvInput', get_class($command->input), '->run() creates an ArgvInput by default if none is given');
485-
$this->assertSame('Symfony\Component\Console\Output\ConsoleOutput', get_class($command->output), '->run() creates a ConsoleOutput by default if none is given');
484+
$this->assertInstanceOf('Symfony\Component\Console\Input\ArgvInput', $command->input, '->run() creates an ArgvInput by default if none is given');
485+
$this->assertInstanceOf('Symfony\Component\Console\Output\ConsoleOutput', $command->output, '->run() creates a ConsoleOutput by default if none is given');
486486

487487
$application = new Application();
488488
$application->setAutoExit(false);

0 commit comments

Comments
 (0)