@@ 234-241 (lines=8) @@ | ||
231 | $this->assertSame($expectedDate->format('c'), $data['date']); |
|
232 | } |
|
233 | ||
234 | public function testThatCanTransformObjectWithIteratorValue() |
|
235 | { |
|
236 | $transformer = $this->getTransformer(); |
|
237 | $document = $transformer->transform(new POPO(), ['iterator' => []]); |
|
238 | $data = $document->getData(); |
|
239 | ||
240 | $this->assertSame(['value1'], $data['iterator']); |
|
241 | } |
|
242 | ||
243 | public function testThatCanTransformObjectWithArrayValue() |
|
244 | { |
|
@@ 273-280 (lines=8) @@ | ||
270 | ); |
|
271 | } |
|
272 | ||
273 | public function testThatNullValuesAreNotFilteredOut() |
|
274 | { |
|
275 | $transformer = $this->getTransformer(); |
|
276 | $document = $transformer->transform(new POPO(), ['nullValue' => []]); |
|
277 | $data = $document->getData(); |
|
278 | ||
279 | $this->assertTrue(array_key_exists('nullValue', $data)); |
|
280 | } |
|
281 | ||
282 | /** |
|
283 | * @expectedException \Symfony\Component\PropertyAccess\Exception\RuntimeException |