improved calendar (#784)

This commit is contained in:
Kevin Papst
2019-05-19 16:16:20 +02:00
committed by GitHub
parent 1903d6fb77
commit d2ad87d09c
66 changed files with 1030 additions and 1190 deletions

View File

@@ -16,7 +16,9 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Console\Tester\CommandTester;
/**
* @coversDefaultClass \App\Command\RunUnitTestsCommand
* @covers \App\Command\RunUnitTestsCommand
* @covers \App\Command\BashExecutor
* @covers \App\Command\BashResult
* @group integration
*/
class RunUnitTestsCommandTest extends KernelTestCase
@@ -46,7 +48,7 @@ class RunUnitTestsCommandTest extends KernelTestCase
public function testSuccessCommand()
{
$result = new BashResult(0, 'FooBar');
$result = new BashResult(0);
$this->executor->setResult($result);
$command = $this->application->find('kimai:test-unit');
@@ -55,16 +57,15 @@ class RunUnitTestsCommandTest extends KernelTestCase
$commandTester->execute($inputs);
$output = $commandTester->getDisplay();
$this->assertContains('FooBar', $output);
$this->assertContains('[OK] All tests were successful', $output);
$this->assertStringStartsWith('/bin/phpunit --exclude-group integration', $this->executor->getCommand());
$this->assertStringStartsWith('/vendor/bin/phpunit --exclude-group integration', $this->executor->getCommand());
$this->assertContains($this->directory, $this->executor->getCommand());
}
public function testFailureCommand()
{
$result = new BashResult(1, 'BarFoo');
$result = new BashResult(1);
$this->executor->setResult($result);
$command = $this->application->find('kimai:test-unit');
@@ -73,10 +74,9 @@ class RunUnitTestsCommandTest extends KernelTestCase
$commandTester->execute($inputs);
$output = $commandTester->getDisplay();
$this->assertContains('BarFoo', $output);
$this->assertContains('[ERROR] Found problems while running tests', $output);
$this->assertStringStartsWith('/bin/phpunit --exclude-group integration', $this->executor->getCommand());
$this->assertStringStartsWith('/vendor/bin/phpunit --exclude-group integration', $this->executor->getCommand());
$this->assertContains($this->directory, $this->executor->getCommand());
}
}