summaryrefslogtreecommitdiff
path: root/tests/UnitTests/simpletest/test/dumper_test.php
diff options
context:
space:
mode:
authorwei <>2006-04-14 05:14:34 +0000
committerwei <>2006-04-14 05:14:34 +0000
commit7949f7fe746dbbe3eeefbc123bbb2c551b091733 (patch)
tree3880a5fbad51a2c9aca5ab5c5dc5b01f1a8f2da6 /tests/UnitTests/simpletest/test/dumper_test.php
parent9e21d160ead61cd0ed86c16a0668c50b14f58baf (diff)
Fixed #93 and #121
Diffstat (limited to 'tests/UnitTests/simpletest/test/dumper_test.php')
-rw-r--r--tests/UnitTests/simpletest/test/dumper_test.php87
1 files changed, 0 insertions, 87 deletions
diff --git a/tests/UnitTests/simpletest/test/dumper_test.php b/tests/UnitTests/simpletest/test/dumper_test.php
deleted file mode 100644
index f0169247..00000000
--- a/tests/UnitTests/simpletest/test/dumper_test.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
- // $Id: dumper_test.php,v 1.4 2004/09/24 22:55:10 lastcraft Exp $
-
- class DumperDummy {
- }
-
- class TestOfTextFormatting extends UnitTestCase {
-
- function testClipping() {
- $dumper = new SimpleDumper();
- $this->assertEqual(
- $dumper->clipString("Hello", 6),
- "Hello",
- "Hello, 6->%s");
- $this->assertEqual(
- $dumper->clipString("Hello", 5),
- "Hello",
- "Hello, 5->%s");
- $this->assertEqual(
- $dumper->clipString("Hello world", 3),
- "Hel...",
- "Hello world, 3->%s");
- $this->assertEqual(
- $dumper->clipString("Hello world", 6, 3),
- "Hello ...",
- "Hello world, 6, 3->%s");
- $this->assertEqual(
- $dumper->clipString("Hello world", 3, 6),
- "...o w...",
- "Hello world, 3, 6->%s");
- $this->assertEqual(
- $dumper->clipString("Hello world", 4, 11),
- "...orld",
- "Hello world, 4, 11->%s");
- $this->assertEqual(
- $dumper->clipString("Hello world", 4, 12),
- "...orld",
- "Hello world, 4, 12->%s");
- }
-
- function testDescribeNull() {
- $dumper = new SimpleDumper();
- $this->assertWantedPattern('/null/i', $dumper->describeValue(null));
- }
-
- function testDescribeBoolean() {
- $dumper = new SimpleDumper();
- $this->assertWantedPattern('/boolean/i', $dumper->describeValue(true));
- $this->assertWantedPattern('/true/i', $dumper->describeValue(true));
- $this->assertWantedPattern('/false/i', $dumper->describeValue(false));
- }
-
- function testDescribeString() {
- $dumper = new SimpleDumper();
- $this->assertWantedPattern('/string/i', $dumper->describeValue('Hello'));
- $this->assertWantedPattern('/Hello/', $dumper->describeValue('Hello'));
- }
-
- function testDescribeInteger() {
- $dumper = new SimpleDumper();
- $this->assertWantedPattern('/integer/i', $dumper->describeValue(35));
- $this->assertWantedPattern('/35/', $dumper->describeValue(35));
- }
-
- function testDescribeFloat() {
- $dumper = new SimpleDumper();
- $this->assertWantedPattern('/float/i', $dumper->describeValue(0.99));
- $this->assertWantedPattern('/0\.99/', $dumper->describeValue(0.99));
- }
-
- function testDescribeArray() {
- $dumper = new SimpleDumper();
- $this->assertWantedPattern('/array/i', $dumper->describeValue(array(1, 4)));
- $this->assertWantedPattern('/2/i', $dumper->describeValue(array(1, 4)));
- }
-
- function testDescribeObject() {
- $dumper = new SimpleDumper();
- $this->assertWantedPattern(
- '/object/i',
- $dumper->describeValue(new DumperDummy()));
- $this->assertWantedPattern(
- '/DumperDummy/i',
- $dumper->describeValue(new DumperDummy()));
- }
- }
-?> \ No newline at end of file