This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 271355 - `Rerun failed` button does not work on @dataProvider tests
Summary: `Rerun failed` button does not work on @dataProvider tests
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: PHPUnit (show other bugs)
Version: 8.2
Hardware: PC Other
: P3 normal (vote)
Assignee: issues@php
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-23 14:28 UTC by mwvdlee
Modified: 2017-08-23 14:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mwvdlee 2017-08-23 14:28:40 UTC
If you make a PHPUnit testcase using `@dataProvider`, where one of the tests fails, clicking the "Rerun Failed" button results in PHPUnit starting without running any tests.

To reproduce, use the following TestCase class:

<?php
class RerunProviderTest extends PHPUnit_Framework_TestCase
{
	/**
	 * @dataProvider dataRerun 
	 */
	public function testRerun($ok)
	{
		$this->assertTrue($ok);
	}

	public function dataRerun()
	{
		return [[true], [false]];
	}

}

On first run, it reports the second test to fail (which is obviously as expected).

If you then click `Rerun failed`, the test results and output report `No tests executed!`.