all.test in Coder 6
File
scripts/coder_format/tests/all.test
View source
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . drupal_get_path('module', 'coder') . '/scripts/coder_format/tests');
if (is_dir('Text/Diff')) {
include_once 'Text/Diff.php';
include_once 'Text/Diff/Renderer.php';
include_once 'CoderTestCase.php';
include_once 'CoderTestFile.php';
class CoderFormatTest extends CoderTestCase {
function getInfo() {
return array(
'name' => 'Full coder_format tests',
'description' => t('Tests all of the functionality of the coder_format script.'),
'group' => 'Coder Format Tests',
);
}
function test() {
$dir = drupal_get_path('module', 'coder') . '/scripts/coder_format/tests/tests';
$files = array_keys(file_scan_directory($dir, '\\.phpt$'));
$c = 10;
foreach ($files as $file) {
$expectation = new CoderTestFile();
$result = $this
->assert($expectation, $file, '%s');
if (!$result) {
$this->_reporter
->writeContent($expectation
->render(), $c++);
}
}
}
}
}