[pLog-svn] r4752 - in plog/branches/lifetype-1.2/class: logger test/tests test/tests/logger
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Feb 18 14:40:07 EST 2007
Author: oscar
Date: 2007-02-18 14:40:06 -0500 (Sun, 18 Feb 2007)
New Revision: 4752
Added:
plog/branches/lifetype-1.2/class/test/tests/logger/
plog/branches/lifetype-1.2/class/test/tests/logger/LogUtil_test.class.php
Removed:
plog/branches/lifetype-1.2/class/logger/LogUtilTest.php
Log:
move one test class to the right place
Deleted: plog/branches/lifetype-1.2/class/logger/LogUtilTest.php
===================================================================
--- plog/branches/lifetype-1.2/class/logger/LogUtilTest.php 2007-02-18 19:25:26 UTC (rev 4751)
+++ plog/branches/lifetype-1.2/class/logger/LogUtilTest.php 2007-02-18 19:40:06 UTC (rev 4752)
@@ -1,39 +0,0 @@
-<?php
-
-require_once "LogUtil.php";
-require_once "PHPUnit2/Framework/TestCase.php";
-
-class LogUtilTest extends PHPUnit2_Framework_TestCase {
-
- protected function setUp() {
- }
-
- public function testFormat() {
- // test integer
- $var = 1;
- $this->assertEquals("2", LogUtil::format($var));
-
- // test string
- $var = "test";
- $this->assertEquals("test",LogUtil::format($var));
-
- // test simple array
- $var = array("a"=>1,"b"=>2);
- $this->assertEquals("array(2) {
- [\"a\"]=>
- int(1)
- [\"b\"]=>
- int(2)
-}
-",LogUtil::format($var));
-
- // test boolean
- $var = true;
- $this->assertEquals("TRUE",LogUtil::format($var));
-
- // test object
- // but how to? object->toString()?
- }
-}
-?>
-
Copied: plog/branches/lifetype-1.2/class/test/tests/logger/LogUtil_test.class.php (from rev 4702, plog/branches/lifetype-1.2/class/logger/LogUtilTest.php)
===================================================================
--- plog/branches/lifetype-1.2/class/test/tests/logger/LogUtil_test.class.php (rev 0)
+++ plog/branches/lifetype-1.2/class/test/tests/logger/LogUtil_test.class.php 2007-02-18 19:40:06 UTC (rev 4752)
@@ -0,0 +1,34 @@
+<?php
+
+ lt_include( PLOG_CLASS_PATH."class/logger/LogUtil.php" );
+ lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+
+ class LogUtil_Test extends LifeTypeTestCase
+ {
+ function testFormat()
+ {
+ // test integer
+ $var = 1;
+ $this->assertEquals("1", LogUtil::format($var));
+
+ // test string
+ $var = "test";
+ $this->assertEquals("test",LogUtil::format($var));
+
+ // test simple array
+ $var = array("a"=>1,"b"=>2);
+ $this->assertEquals("array(2) {
+ [\"a\"]=>
+ int(1)
+ [\"b\"]=>
+ int(2)
+ }
+ ",LogUtil::format($var));
+
+ // test boolean
+ $var = true;
+ $this->assertEquals("TRUE",LogUtil::format($var));
+ }
+ }
+?>
+
More information about the pLog-svn
mailing list