Last active
December 14, 2015 08:49
-
-
Save ceeram/5060990 to your computer and use it in GitHub Desktop.
dataProvider outside test class
This file contains 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 | |
/** | |
* Provider Test Case | |
* | |
*/ | |
class ProviderTest extends PHPUnit_Framework_TestCase { | |
/** | |
* | |
* @dataProvider ProviderCollection::provider | |
*/ | |
public function testClassProvider($arg) { | |
$this->assertEquals(true, $arg); | |
} | |
} | |
class ProviderCollection { | |
/** | |
* dataProvider for ProviderTest::testClassProvider() | |
* | |
*/ | |
public function provider() { | |
return array( | |
array(1), | |
array(true) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment