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
I'm setting up a small number of tests which need to test a pretty large and varied dataset. To keep this manageable, I've set up an abstract class which contains the actual test and a large number of concrete classes which basically only contain the data provider method for that data-subset for use by the test.
For a some of the datasets I haven't actually received/set up any test data yet. I'd like to mark those as 'Incomplete'.
For some others, I know that with the current codebase they will fail, so for the time being (until the code is fixed), I'd like to mark those for 'Skip'.
Is there any way I can do this ? I.e. mark a data provider method as 'Incomplete'/'skip' ?
Smile,
Juliette
Sample code of the set-up:
<php
// File abstract-class-content-analysis.phpabstractclass Content_Analysis extends PHPUnit_Framework_TestCase {
/** * @dataProvider valid_content */functiontestContentAnalysis( $content, $expected) {
// do some tests
}
}
?><?php// File ServiceTest.phpinclude_once( 'abstract-class-content-analysis.php' );
class ServiceTest extends Content_Analysis {
/** * @todo Set up test data */functionvalid_content() {
// Here I would like to mark the data provider as incomplete or for skippingreturnarray(
);
}
}
?>
The text was updated successfully, but these errors were encountered:
There's actually an open PR for this (see: sebastianbergmann/phpunit#997). It's basically just waiting on @sebastianbergmann's decision since it's kind of a bigger feature. After reading the zf2 tickets linked in the PR, I think it makes sense.
@whatthejeff Oh.. duh... stupid me, posting this in the website repo, not in the PHPUnit repo ;-) Thanks for pointing me to the open issue, will have a read and +1 it.
Hi Sebastian, Jeff,
I'm setting up a small number of tests which need to test a pretty large and varied dataset. To keep this manageable, I've set up an abstract class which contains the actual test and a large number of concrete classes which basically only contain the data provider method for that data-subset for use by the test.
For a some of the datasets I haven't actually received/set up any test data yet. I'd like to mark those as 'Incomplete'.
For some others, I know that with the current codebase they will fail, so for the time being (until the code is fixed), I'd like to mark those for 'Skip'.
Is there any way I can do this ? I.e. mark a data provider method as 'Incomplete'/'skip' ?
Smile,
Juliette
Sample code of the set-up:
The text was updated successfully, but these errors were encountered: