/**
  * Test hydrate single entity
  */
 public function testHydrateEntity()
 {
     $serializer = SerializerBuilder::create()->build();
     $service = new HydratorService($serializer, $this->getTransformer());
     $result = $service->hydrateEntity(json_encode($this->testData), 'MJanssen\\Assets\\Entity\\Test');
     $this->assertEquals($this->createEntity($this->testData), $result);
 }
 public function testIfDataIsDecodedFromJsonToArray()
 {
     $transformer = $this->getTransformerMock();
     $transformer->expects($this->once())->method('transformHydrateData')->with($this->testData);
     $service = new HydratorService(SerializerBuilder::create()->build(), $transformer);
     $service->hydrateEntity(json_encode($this->testData), 'MJanssen\\Assets\\Entity\\Test');
 }