@@ 129-136 (lines=8) @@ | ||
126 | /** |
|
127 | * Test that documents can be returned by a given page |
|
128 | */ |
|
129 | public function testGetByPageWithoutEmbargoes() |
|
130 | { |
|
131 | $pageWithEmbargoes = $this->objFromFixture('SiteTree', 's3'); |
|
132 | $documents = $this->dms->getByPage($pageWithEmbargoes); |
|
133 | // Fixture: 6 documents in set, 1 is embargoed |
|
134 | $this->assertCount(5, $documents, 'Embargoed documents are excluded by default'); |
|
135 | $this->assertContainsOnlyInstancesOf('DMSDocument', $documents); |
|
136 | } |
|
137 | ||
138 | /** |
|
139 | * Test that embargoed documents are excluded from getByPage |
|
@@ 141-148 (lines=8) @@ | ||
138 | /** |
|
139 | * Test that embargoed documents are excluded from getByPage |
|
140 | */ |
|
141 | public function testGetByPageWithEmbargoedDocuments() |
|
142 | { |
|
143 | $pageWithEmbargoes = $this->objFromFixture('SiteTree', 's3'); |
|
144 | $documents = $this->dms->getByPage($pageWithEmbargoes, true); |
|
145 | // Fixture: 6 documents in set, 1 is embargoed |
|
146 | $this->assertCount(6, $documents, 'Embargoed documents can be included'); |
|
147 | $this->assertContainsOnlyInstancesOf('DMSDocument', $documents); |
|
148 | } |
|
149 | ||
150 | /** |
|
151 | * Ensure the shortcode handler key is configurable |