Last active
December 16, 2015 00:10
-
-
Save andriesss/5345848 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DummyTest extends PHPUnit_Framework_TestCase | |
{ | |
/** | |
* @group example | |
* @dataProvider provider | |
*/ | |
public function testFoo($a) | |
{ | |
$this->assertEquals($a, $a); | |
} | |
public function provider() | |
{ | |
echo "I am executed!!\n"; | |
return array( | |
array('foo'), | |
array('baz'), | |
array('bar'), | |
); | |
} | |
} | |
?> | |
phpunit --exclude-group example DummyTest.php | |
I am executed!! | |
PHPUnit 3.7.14 by Sebastian Bergmann. | |
Time: 0 seconds, Memory: 3.75Mb | |
No tests executed! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now when you run phpunit --exclude-group DummyTest it will skip it
See http://www.phpunit.de/manual/current/en/textui.html#textui.clioptions for usage of CLI switches