| [ Index ] |
PHP Cross Reference of JPSpan 0.4 (beta) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: unserializer.test.php,v 1.4 2004/11/15 10:37:37 harryf Exp $ 4 * @package JPSpan 5 * @subpackage Tests 6 */ 7 8 /** 9 * Includes 10 */ 11 require_once ('../config.php'); 12 require_once JPSPAN . 'Unserializer.php'; 13 14 /** 15 * @package JPSpan 16 * @subpackage Tests 17 */ 18 class TestOfJPSpan_Unserializer extends UnitTestCase { 19 20 function TestOfJPSpan_Unserializer() { 21 $this->UnitTestCase('TestOfJPSpan_Unserializer'); 22 } 23 24 function testUnserializeXML() { 25 $var = 'foo'; 26 $s = '<?xml version="1.0" encoding="UTF-8"?><r><s>foo</s></r>'; 27 $this->assertEqual(JPSpan_Unserializer::unserialize($s,'xml'),$var); 28 } 29 30 function testUnserializePHP() { 31 $var = 'foo'; 32 $s = serialize($var); 33 $this->assertEqual(JPSpan_Unserializer::unserialize($s,'php'),$var); 34 } 35 36 37 } 38 39 /** 40 * Conditional test runner 41 */ 42 if (!defined('TEST_RUNNING')) { 43 define('TEST_RUNNING', true); 44 $test = &new TestOfJPSpan_Unserializer(); 45 $test->run(new HtmlReporter()); 46 } 47 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Nov 26 11:42:46 2004 | Cross-referenced by PHPXref 0.6 |