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