public function testDoesNotRewriteCustomType()
 {
     $event = $this->createEvent($obj = new SimpleObjectProxy('a', 'b'), Type::from('FakedName'));
     $this->subscriber->onPreSerialize($event);
     $this->assertEquals(Type::from('FakedName'), $event->getType());
     $this->assertTrue($obj->__isInitialized());
 }
 public function testInitializedDoctrineProxy()
 {
     if (!class_exists('Doctrine\\ORM\\Version')) {
         $this->markTestSkipped('Doctrine is not available.');
     }
     $object = new SimpleObjectProxy('foo', 'bar');
     $object->__load();
     $this->assertEquals($this->getContent('orm_proxy'), $this->serialize($object));
 }