You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When tests are not marked public or their matching data providers cannot be found, they are marked as failed in the command line output. However, they are not marked failed in the junit result. If tests are marked failed on the command line output, I think they should be marked failed in the junit result.
<?php
class Failure_Test extends PHPUnit_Framework_TestCase
{
/**
* @dataProvider dataprovider_that_does_not_exist
*/
public function test_data_provider($param)
{
$this->assertFalse(true);
}
private function test_private_function()
{
$this->assertFalse(true);
}
}
$ phpunit --log-junit failure_test.xml Failure_Test.php
PHPUnit 4.1.3 by Sebastian Bergmann.
Configuration read from [...]/phpunit.xml
FF
Time: 128 ms, Memory: 9.50Mb
There were 2 failures:
1) Warning
The data provider specified for Failure_Test::test_data_provider is invalid.
Method dataprovider_that_does_not_exist does not exist
phar:///usr/local/Cellar/phpunit/4.1.3/libexec/phpunit-4.1.3.phar/phpunit/TextUI/Command.php:179
phar:///usr/local/Cellar/phpunit/4.1.3/libexec/phpunit-4.1.3.phar/phpunit/TextUI/Command.php:132
2) Warning
Test method "test_private_function" in test class "Failure_Test" is not public.
phar:///usr/local/Cellar/phpunit/4.1.3/libexec/phpunit-4.1.3.phar/phpunit/TextUI/Command.php:179
phar:///usr/local/Cellar/phpunit/4.1.3/libexec/phpunit-4.1.3.phar/phpunit/TextUI/Command.php:132
FAILURES!
Tests: 2, Assertions: 0, Failures: 2.
When tests are not marked public or their matching data providers cannot be found, they are marked as failed in the command line output. However, they are not marked failed in the junit result. If tests are marked failed on the command line output, I think they should be marked failed in the junit result.
The text was updated successfully, but these errors were encountered: