Suite for .phpt test cases.
@package PHPUnit @subpackage Extensions_PhptTestCase @author Sebastian Bergmann <sebastian@phpunit.de> @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de> @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License @link http://www.phpunit.de/ @since Class available since Release 3.1.4
Expanded class hierarchy of PHPUnit_Extensions_PhptTestSuite
class PHPUnit_Extensions_PhptTestSuite extends PHPUnit_Framework_TestSuite {
/**
* Constructs a new TestSuite for .phpt test cases.
*
* @param string $directory
* @param array $options Array with ini settings for the php instance run,
* key being the name if the setting, value the ini value.
* @throws PHPUnit_Framework_Exception
*/
public function __construct($directory, array $options = array()) {
if (is_string($directory) && is_dir($directory)) {
$this
->setName($directory);
$facade = new File_Iterator_Facade();
$files = $facade
->getFilesAsArray($directory, '.phpt');
foreach ($files as $file) {
$this
->addTestFile($file, $options);
}
}
else {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'directory name');
}
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PHPUnit_Extensions_PhptTestSuite:: |
public | function |
Constructs a new TestSuite for .phpt test cases. Overrides PHPUnit_Framework_TestSuite:: |
|
PHPUnit_Framework_TestSuite:: |
protected | property | Enable or disable the backup and restoration of the $GLOBALS array. | |
PHPUnit_Framework_TestSuite:: |
protected | property | Enable or disable the backup and restoration of static attributes. | |
PHPUnit_Framework_TestSuite:: |
protected | property | The test groups of the test suite. | |
PHPUnit_Framework_TestSuite:: |
protected | property | The name of the test suite. | |
PHPUnit_Framework_TestSuite:: |
protected | property | The number of tests in the test suite. | |
PHPUnit_Framework_TestSuite:: |
protected | property | ||
PHPUnit_Framework_TestSuite:: |
protected | property | The tests in the test suite. | |
PHPUnit_Framework_TestSuite:: |
public | function | Adds a test to the suite. | |
PHPUnit_Framework_TestSuite:: |
public | function | Wraps both <code>addTest()</code> and <code>addTestSuite</code> as well as the separate import statements for the user's convenience. | |
PHPUnit_Framework_TestSuite:: |
public | function | Wrapper for addTestFile() that adds multiple test files. | |
PHPUnit_Framework_TestSuite:: |
protected | function | ||
PHPUnit_Framework_TestSuite:: |
public | function | Adds the tests from the given class to the suite. | |
PHPUnit_Framework_TestSuite:: |
public | function | Counts the number of test cases that will be run by this test. | |
PHPUnit_Framework_TestSuite:: |
protected | function | Creates a default TestResult object. | |
PHPUnit_Framework_TestSuite:: |
public static | function | ||
PHPUnit_Framework_TestSuite:: |
public | function | Returns the test groups of the suite. | |
PHPUnit_Framework_TestSuite:: |
public | function | Returns an iterator for this test suite. | |
PHPUnit_Framework_TestSuite:: |
public | function | Returns the name of the suite. | |
PHPUnit_Framework_TestSuite:: |
public static | function | ||
PHPUnit_Framework_TestSuite:: |
public static | function | ||
PHPUnit_Framework_TestSuite:: |
public | function | Mark the test suite as skipped. | |
PHPUnit_Framework_TestSuite:: |
public | function |
Runs the tests and collects their result in a TestResult. Overrides PHPUnit_Framework_Test:: |
|
PHPUnit_Framework_TestSuite:: |
public | function | Runs a test. | |
PHPUnit_Framework_TestSuite:: |
public | function | @since Method available since Release 3.3.0 | |
PHPUnit_Framework_TestSuite:: |
public | function | @since Method available since Release 3.4.0 | |
PHPUnit_Framework_TestSuite:: |
public | function | Sets the name of the suite. | |
PHPUnit_Framework_TestSuite:: |
protected | function | Template Method that is called before the tests of this test suite are run. | |
PHPUnit_Framework_TestSuite:: |
protected | function | Template Method that is called after the tests of this test suite have finished running. | |
PHPUnit_Framework_TestSuite:: |
public | function | Returns the test at the given index. | |
PHPUnit_Framework_TestSuite:: |
public | function | Returns the tests as an enumeration. | |
PHPUnit_Framework_TestSuite:: |
public | function |
Returns a string representation of the test suite. Overrides PHPUnit_Framework_SelfDescribing:: |
|
PHPUnit_Framework_TestSuite:: |
protected static | function |