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