@@ 121-129 (lines=9) @@ | ||
118 | $this->assertInstanceOf(Image::class, $image); |
|
119 | } |
|
120 | ||
121 | public function testScalarCollection() |
|
122 | { |
|
123 | $article = new Article(); |
|
124 | $article->id = '/test/article'; |
|
125 | $article->paragraphs = ['one', 'two', 'three']; |
|
126 | $article = $this->persistAndReloadArticle($article); |
|
127 | ||
128 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
129 | } |
|
130 | ||
131 | public function testBoolean() |
|
132 | { |
@@ 238-248 (lines=11) @@ | ||
235 | $this->assertEquals('/test/article2', $article->objectReferences[1]->id); |
|
236 | } |
|
237 | ||
238 | public function testScalarCollection() |
|
239 | { |
|
240 | $this->initScalarCollectionArticle(); |
|
241 | ||
242 | $article = new Article(); |
|
243 | $article->id = '/test/article'; |
|
244 | $article->paragraphs = ['one', 'two', 'three']; |
|
245 | $article = $this->persistAndReloadArticle($article); |
|
246 | ||
247 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
248 | } |
|
249 | ||
250 | public function testIntegerCollection() |
|
251 | { |
|
@@ 250-260 (lines=11) @@ | ||
247 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
248 | } |
|
249 | ||
250 | public function testIntegerCollection() |
|
251 | { |
|
252 | $this->initScalarCollectionArticle(); |
|
253 | ||
254 | $article = new Article(); |
|
255 | $article->id = '/test/article'; |
|
256 | $article->numbers = ['12', '13', '14']; |
|
257 | $article = $this->persistAndReloadArticle($article); |
|
258 | ||
259 | $this->assertSame([12, 13, 14], $article->numbers); |
|
260 | } |
|
261 | ||
262 | private function persistAndReloadArticle(Article $article) |
|
263 | { |