summaryrefslogtreecommitdiff
path: root/_test/lib/web.inc.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-05-01 12:38:41 -0700
committerAndreas Gohr <andi@splitbrain.org>2012-05-01 12:38:41 -0700
commit3c0d44f1aa44d3ac3d8b9e652d172b1eda680bbf (patch)
tree5a9a42fb720a774c2bb8c393d3046d7beb11bf8f /_test/lib/web.inc.php
parente67fdd7b79e8f05b9e7e9164691114222e3c377c (diff)
parent1831d8a0f848f2e0dd5ef195791b6beaa5d1acb7 (diff)
downloadrpg-3c0d44f1aa44d3ac3d8b9e652d172b1eda680bbf.tar.gz
rpg-3c0d44f1aa44d3ac3d8b9e652d172b1eda680bbf.tar.bz2
Merge pull request #96 from dom-mel/phpunit
Replace SimpleTest with PHPUnit
Diffstat (limited to '_test/lib/web.inc.php')
-rw-r--r--_test/lib/web.inc.php47
1 files changed, 0 insertions, 47 deletions
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 @@
-<?php
-/**
-* @package WACT_TESTS
-* @version $Id: web.inc.php,v 1.6 2005/08/20 09:46:06 pachanga Exp $
-*/
-
-SimpleTestOptions::ignore('DWWebTestCase');
-
-class DWWebTestCase extends WebTestCase {
-
- function assertNormalPage() {
- $this->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;
- }
-
-}