@@ 115-123 (lines=9) @@ | ||
112 | $this->assertInstanceOf(Image::class, $image); |
|
113 | } |
|
114 | ||
115 | public function testScalarCollection() |
|
116 | { |
|
117 | $article = new Article(); |
|
118 | $article->id = '/test/article'; |
|
119 | $article->paragraphs = ['one', 'two', 'three']; |
|
120 | $article = $this->persistAndReloadArticle($article); |
|
121 | ||
122 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
123 | } |
|
124 | ||
125 | private function persistAndReloadArticle(Article $article) |
|
126 | { |
@@ 211-221 (lines=11) @@ | ||
208 | $this->assertEquals('/test/article2', $article->objectReferences[1]->id); |
|
209 | } |
|
210 | ||
211 | public function testScalarCollection() |
|
212 | { |
|
213 | $this->initScalarCollectionArticle(); |
|
214 | ||
215 | $article = new Article(); |
|
216 | $article->id = '/test/article'; |
|
217 | $article->paragraphs = ['one', 'two', 'three']; |
|
218 | $article = $this->persistAndReloadArticle($article); |
|
219 | ||
220 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
221 | } |
|
222 | ||
223 | public function testIntegerCollection() |
|
224 | { |
|
@@ 223-233 (lines=11) @@ | ||
220 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
221 | } |
|
222 | ||
223 | public function testIntegerCollection() |
|
224 | { |
|
225 | $this->initScalarCollectionArticle(); |
|
226 | ||
227 | $article = new Article(); |
|
228 | $article->id = '/test/article'; |
|
229 | $article->numbers = ['12', '13', '14']; |
|
230 | $article = $this->persistAndReloadArticle($article); |
|
231 | ||
232 | $this->assertSame([12, 13, 14], $article->numbers); |
|
233 | } |
|
234 | ||
235 | private function persistAndReloadArticle(Article $article) |
|
236 | { |