/**
  * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException
  * @expectedExceptionMessage The object must implement the "\DateTimeInterface".
  */
 public function testInvalidDataThrowException()
 {
     $this->normalizer->normalize(new \stdClass());
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException
  * @expectedExceptionMessage The object must implement the "\DateTimeInterface".
  */
 public function testNormalizeInvalidObjectThrowsException()
 {
     $this->normalizer->normalize(new \stdClass());
 }