@@ 36-49 (lines=14) @@ | ||
33 | $this->initPhpcr($this->documentManager); |
|
34 | } |
|
35 | ||
36 | public function testStringCollection() |
|
37 | { |
|
38 | $article = new Article(); |
|
39 | $article->id = '/test/article'; |
|
40 | $article->title = 'Foo'; |
|
41 | $article->paragraphs = ['one', 'two', 'three']; |
|
42 | ||
43 | $this->documentManager->persist($article); |
|
44 | $this->documentManager->flush(); |
|
45 | $this->documentManager->clear(); |
|
46 | ||
47 | $article = $this->documentManager->find(null, '/test/article'); |
|
48 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
49 | } |
|
50 | ||
51 | public function testIntegerCollection() |
|
52 | { |
|
@@ 51-64 (lines=14) @@ | ||
48 | $this->assertSame(['one', 'two', 'three'], $article->paragraphs); |
|
49 | } |
|
50 | ||
51 | public function testIntegerCollection() |
|
52 | { |
|
53 | $article = new Article(); |
|
54 | $article->id = '/test/article'; |
|
55 | $article->title = 'Foo'; |
|
56 | $article->numbers = ['12', '13', '14']; |
|
57 | ||
58 | $this->documentManager->persist($article); |
|
59 | $this->documentManager->flush(); |
|
60 | $this->documentManager->clear(); |
|
61 | ||
62 | $article = $this->documentManager->find(null, '/test/article'); |
|
63 | $this->assertSame([12, 13, 14], $article->numbers); |
|
64 | } |
|
65 | } |
|
66 |