Annotation of embedaddon/php/ext/spl/tests/bug62672.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #62672 (Error on serialize of ArrayObject)
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: class ObjA
        !             7: {
        !             8:     private $_varA;
        !             9: 
        !            10:     public function __construct(Iterator $source)
        !            11:     {
        !            12:         $this->_varA = $source;
        !            13:     }
        !            14: }
        !            15: 
        !            16: class ObjB extends ObjA
        !            17: {
        !            18:     private $_varB;
        !            19: 
        !            20:     public function __construct(ArrayObject $keys)
        !            21:     {
        !            22:         $this->_varB = $keys;
        !            23:         parent::__construct($keys->getIterator());
        !            24:     }
        !            25: }
        !            26: 
        !            27: $obj = new ObjB(new ArrayObject());
        !            28: 
        !            29: var_dump($obj == unserialize(serialize($obj)));
        !            30: --EXPECTF--
        !            31: bool(true)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>