From d59108b91e9bf9fd56dc2e697cf31f9bbc7f9cd4 Mon Sep 17 00:00:00 2001 From: Tobias Sarnowski Date: Wed, 18 Apr 2012 12:00:10 +0200 Subject: removed deprecated old test framework --- _test/lib/web.inc.php | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 _test/lib/web.inc.php (limited to '_test/lib/web.inc.php') diff --git a/_test/lib/web.inc.php b/_test/lib/web.inc.php deleted file mode 100644 index 7ca70f204..000000000 --- a/_test/lib/web.inc.php +++ /dev/null @@ -1,47 +0,0 @@ -assertResponse(array(200)); - $this->assertNoUnwantedPattern('/Warning:/i'); - $this->assertNoUnwantedPattern('/Error:/i'); - $this->assertNoUnwantedPattern('/Fatal error/i'); - } - - function assertWantedLiteral($str) { - $this->assertWantedPattern('/' . preg_quote($str, '/'). '/'); - } - - function assertNoUnWantedLiteral($str) { - $this->assertNoUnWantedPattern('/' . preg_quote($str, '/'). '/'); - } - - function &_fileToPattern($file) { - $file_as_array = file($file); - $pattern = '#^'; - foreach ($file_as_array as $line) { - /* strip trailing newline */ - if ($line[strlen($line) - 1] == "\n") { - $line = substr($line, 0, strlen($line) - 1); - } - $line = preg_quote($line, '#'); - - /* replace paths with wildcard */ - $line = preg_replace("#'/[^']*#", "'.*", $line); - - $pattern .= $line . '\n'; - } - /* strip final newline */ - $pattern = substr($pattern, 0, strlen($pattern) - 2); - $pattern .= '$#i'; - return $pattern; - } - -} -- cgit v1.2.3