From 79536558fabe3085be01bdc99e0754f947c98f6f Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 10 Jan 2009 13:48:06 +0000 Subject: [PATCH] MDL-17841 removed bogus remove lib/simpletest/slowcodetest.php --- lib/simpletest/slowtestcode.php | 58 --------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 lib/simpletest/slowtestcode.php diff --git a/lib/simpletest/slowtestcode.php b/lib/simpletest/slowtestcode.php deleted file mode 100644 index 0a5e8bb4bd9..00000000000 --- a/lib/simpletest/slowtestcode.php +++ /dev/null @@ -1,58 +0,0 @@ -dirroot . $string; - } - - function test_php_syntax() { - global $CFG; - - // See if we can run php from the command line: - $this->phppath = 'php'; - if (!shell_exec($this->phppath . ' -v')) { - // If not, we can't do anything. - $this->fail('Cannot test PHP syntax because PHP is not on the path.'); - return; - } - - $regexp = '/\.(' . implode('|', $this->php_code_extensions) . ')$/'; - $ignore = array_map(array($this, 'prepend_dirroot'), $this->ignore_folders); - recurseFolders($CFG->dirroot, array($this, 'syntax_check_file'), $regexp, false, $ignore); - } - - var $dotcount = 0; - function syntax_check_file($filepath) { - // If you don't print something for each test, then for some reason the - // server hangs after a thousand files or so. It is very intermittent. - // Printing a space does not seem to be good enough. - echo '.'; - if (++$this->dotcount % 100 == 0) { - echo '
'; - } - flush(); - $output = shell_exec($this->phppath . ' -d max_execution_time=5 -d short_open_tag= -l ' . escapeshellarg($filepath)); - $this->assertTrue(strpos($output, 'No syntax errors detected') === 0, $output); -// This generates so many fails that it is currently useless. -// $this->assertTrue(stripos(file_get_contents($filepath), "\t") === false, -// "File $filepath contains a tab character."); - } -} -?> \ No newline at end of file