Reorganize test suite.

- Split testLoginLogout() into testBadLogin() and testLoginLogout().
- Mark testCreateSimpleArticle() as incomplete until the popup
  window opened by clicking on VIEW is handled correctly.
- Disable mod_rewrite so that the test suite does not depend on it.
- Remove superfluous check for Testing_Selenium class.
- Migrate TestConfiguration.php.dist to config.xml.dist.
  - Configure whitelist for code coverage information.
    - Be conservative for now and only add include/ and plugins/
      directories for now.
    - Set addUncoveredFilesFromWhitelist="false" because not all
      files are loadable (yet).
- Add documentation for code coverage reporting.
This commit is contained in:
Sebastian Bergmann
2007-12-13 14:14:56 +00:00
parent 2084438fe4
commit fdef2f26f3
8 changed files with 184 additions and 73 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
require_once 'PHPUnit/Util/FilterIterator.php';
if (isset($_GET['PHPUNIT_SELENIUM_TEST_ID'])) {
$files = new PHPUnit_Util_FilterIterator(
new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(dirname(__FILE__))
),
'.phpunit_' . $_GET['PHPUNIT_SELENIUM_TEST_ID']
);
$coverage = array();
foreach ($files as $file) {
$filename = $file->getPathName();
$data = eval('return ' . file_get_contents($filename) . ';');
unset($filename);
foreach ($data as $filename => $lines) {
if (!isset($coverage[$filename])) {
$coverage[$filename] = $lines;
} else {
foreach ($lines as $line => $flag) {
if (!isset($coverage[$filename][$line]) ||
$flag > $coverage[$filename][$line]) {
$coverage[$filename][$line] = $flag;
}
}
}
}
}
var_export($coverage);
}
?>