@@ 16-41 (lines=26) @@ | ||
13 | private $documentManager; |
|
14 | private $updater; |
|
15 | ||
16 | public function setUp() |
|
17 | { |
|
18 | $container = $this->getContainer([ |
|
19 | 'mapping' => [ |
|
20 | Article::class => [ |
|
21 | 'fields' => [ |
|
22 | 'slideshow' => [ |
|
23 | 'type' => 'collection', |
|
24 | 'options' => [ |
|
25 | 'field' => 'image', |
|
26 | ], |
|
27 | ], |
|
28 | 'objectReferences' => [ |
|
29 | 'type' => 'collection', |
|
30 | 'options' => [ |
|
31 | 'field' => 'object_reference', |
|
32 | ], |
|
33 | ], |
|
34 | ], |
|
35 | ], |
|
36 | ], |
|
37 | ]); |
|
38 | $this->documentManager = $container->get('doctrine_phpcr.document_manager'); |
|
39 | $this->initPhpcr($this->documentManager); |
|
40 | $this->updater = $container->get('psi_content_type.storage.doctrine.phpcr_odm.collection_updater'); |
|
41 | } |
|
42 | ||
43 | /** |
|
44 | * It should persist object colletions. |
@@ 9-34 (lines=26) @@ | ||
6 | ||
7 | class ScalarTest extends PhpcrOdmTestCase |
|
8 | { |
|
9 | public function setUp() |
|
10 | { |
|
11 | $container = $this->getContainer([ |
|
12 | 'mapping' => [ |
|
13 | Article::class => [ |
|
14 | 'fields' => [ |
|
15 | 'paragraphs' => [ |
|
16 | 'type' => 'collection', |
|
17 | 'options' => [ |
|
18 | 'field' => 'text', |
|
19 | 'field_options' => [], |
|
20 | ], |
|
21 | ], |
|
22 | 'numbers' => [ |
|
23 | 'type' => 'collection', |
|
24 | 'options' => [ |
|
25 | 'field' => 'integer', |
|
26 | ], |
|
27 | ], |
|
28 | ], |
|
29 | ], |
|
30 | ], |
|
31 | ]); |
|
32 | $this->documentManager = $container->get('doctrine_phpcr.document_manager'); |
|
33 | $this->initPhpcr($this->documentManager); |
|
34 | } |
|
35 | ||
36 | public function testStringCollection() |
|
37 | { |