@@ 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 | { |
@@ 212-222 (lines=11) @@ | ||
209 | $this->assertEquals('/test/article2', $article->objectReferences[1]->id); |
|
210 | } |
|
211 | ||
212 | public function testScalarCollection() |
|
213 | { |
|
214 | $this->initScalarCollectionArticle(); |
|
215 | ||
216 | $article = new Article(); |
|
217 | $article->id = '/test/article'; |
|
218 | $article->paragraphs = ['one', 'two', 'three']; |
|
219 | $article = $this->persistAndReloadArticle($article); |
|
220 | ||
221 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
222 | } |
|
223 | ||
224 | public function testIntegerCollection() |
|
225 | { |
|
@@ 224-234 (lines=11) @@ | ||
221 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
222 | } |
|
223 | ||
224 | public function testIntegerCollection() |
|
225 | { |
|
226 | $this->initScalarCollectionArticle(); |
|
227 | ||
228 | $article = new Article(); |
|
229 | $article->id = '/test/article'; |
|
230 | $article->numbers = ['12', '13', '14']; |
|
231 | $article = $this->persistAndReloadArticle($article); |
|
232 | ||
233 | $this->assertSame([12, 13, 14], $article->numbers); |
|
234 | } |
|
235 | ||
236 | private function persistAndReloadArticle(Article $article) |
|
237 | { |