Exemplo n.º 1
0
 /**
  * @dataProvider getDateTime
  * @group datetime
  */
 public function testDateTimeNoCData($key, $value, $type)
 {
     $handlerRegistry = new HandlerRegistry();
     $handlerRegistry->registerSubscribingHandler(new DateHandler(\DateTime::ISO8601, 'UTC', false));
     $objectConstructor = new UnserializeObjectConstructor();
     $serializer = new Serializer($this->factory, $handlerRegistry, $objectConstructor, $this->serializationVisitors, $this->deserializationVisitors);
     $this->assertEquals($this->getContent($key . '_no_cdata'), $serializer->serialize($value, $this->getFormat()));
 }
Exemplo n.º 2
0
 public function registerHandler($direction, $typeName, callable $handler)
 {
     parent::registerHandler($direction, $typeName, $handler);
     unset($this->initializedHandlers[$direction][$typeName]);
 }