Added code coverage report for PHPUnit plugin. Issue #86.

This commit is contained in:
Dmitry Khomutov 2018-01-20 16:32:18 +07:00
commit 7db036e956
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
4 changed files with 64 additions and 19 deletions

View file

@ -25,32 +25,30 @@ class PhpUnitOptionsTest extends \PHPUnit\Framework\TestCase
'configuration' => 'tests/phpunit.xml',
],
],
[
[
'coverage' => '',
],
[],
],
[
[
'coverage' => '/path/to/coverage2/',
'args' => [
'coverage-html' => '/path/to/coverage1/',
],
],
[
'coverage-html' => [
'/path/to/coverage1/',
'/path/to/coverage2/',
],
'coverage-html' => '/location',
],
],
[
[
'coverage' => true,
'directory' => [
'/path/to/test1/',
'/path/to/test2/',
],
'args' => [
'coverage-html' => '/path/to/coverage1/',
],
],
[
'coverage-html' => '/path/to/coverage1/',
'coverage-html' => '/location',
],
],
[
@ -97,7 +95,7 @@ class PhpUnitOptionsTest extends \PHPUnit\Framework\TestCase
*/
public function testCommandArguments($rawOptions, $parsedArguments)
{
$options = new PhpUnitOptions($rawOptions);
$options = new PhpUnitOptions($rawOptions, '/location');
$this->assertSame($parsedArguments, $options->getCommandArguments());
}
@ -107,7 +105,8 @@ class PhpUnitOptionsTest extends \PHPUnit\Framework\TestCase
[
'run_from' => '/path/to/run/from',
'path' => 'subTest',
]
],
'/location'
);
$this->assertEquals('/path/to/run/from', $options->getRunFrom());