Changeset 1483

Show
Ignore:
Timestamp:
03/30/08 23:19:48 (9 months ago)
Author:
mikey
Message:

extended test for net::stubbles::php::serializer::stubPHPSerializerObjectMapping

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/test/php/net/stubbles/php/serializer/stubPHPSerializerObjectMappingTestCase.php

    r1304 r1483  
    1010                      'net::stubbles::php::serializer::stubPHPSerializerObjectMapping' 
    1111); 
     12/** 
     13 * Helper class for the test. 
     14 * 
     15 * @package     stubbles 
     16 * @subpackage  php_serializer_test 
     17 */ 
    1218class TestSerializingWithSleepAndWakeup 
    1319{ 
     
    1925    public function __wakeup() { $this->wakeupCalled = true; } 
    2026} 
     27/** 
     28 * Helper class for the test. 
     29 * 
     30 * @package     stubbles 
     31 * @subpackage  php_serializer_test 
     32 */ 
    2133class TestForSerializingObjects extends stubBaseObject 
    2234{ 
     
    2638    public function setBar() { $this->bar = 'bar'; } 
    2739} 
     40/** 
     41 * Helper class for the test. 
     42 * 
     43 * @package     stubbles 
     44 * @subpackage  php_serializer_test 
     45 */ 
    2846class TestSerializingPropertyClass { public $blub = 'foo'; } 
     47/** 
     48 * Helper class for the test. 
     49 * 
     50 * @package     stubbles 
     51 * @subpackage  php_serializer_test 
     52 */ 
    2953class TestSerializingWithSetState extends stubBaseObject 
    3054{ 
     
    4973    } 
    5074} 
     75/** 
     76 * Helper class for the test. 
     77 * 
     78 * @package     stubbles 
     79 * @subpackage  php_serializer_test 
     80 */ 
    5181class TestPHPSerializerMapping extends stubBaseObject implements stubPHPSerializerMapping 
    5282{ 
     
    92122        $this->serializer    = new stubPHPSerializer(); 
    93123        $this->objectMapping = new stubPHPSerializerObjectMapping(); 
     124    } 
     125 
     126    /** 
     127     * token for this mapping is always "O" 
     128     * 
     129     * @test 
     130     */ 
     131    public function tokenIsAlwaysO() 
     132    { 
     133        $this->assertEquals('O', $this->objectMapping->getToken()); 
     134    } 
     135 
     136    /** 
     137     * returned information about handled class is always the same 
     138     * 
     139     * @test 
     140     */ 
     141    public function handledClassIsAlwaysTheSame() 
     142    { 
     143        $refClass = $this->objectMapping->getHandledClass(); 
     144        $this->assertType('ReflectionClass', $refClass); 
     145        $this->assertSame($refClass, $this->objectMapping->getHandledClass()); 
    94146    } 
    95147