| @@ 192-206 (lines=15) @@ | ||
| 189 | * |
|
| 190 | * @covers \eZ\Publish\Core\Repository\SectionService::loadSection |
|
| 191 | */ |
|
| 192 | public function testLoadSection() |
|
| 193 | { |
|
| 194 | $sectionService = $this->repository->getSectionService(); |
|
| 195 | ||
| 196 | $section = $sectionService->loadSection(1); |
|
| 197 | ||
| 198 | $this->assertPropertiesCorrect( |
|
| 199 | array( |
|
| 200 | 'id' => 1, |
|
| 201 | 'name' => 'Standard', |
|
| 202 | 'identifier' => 'standard', |
|
| 203 | ), |
|
| 204 | $section |
|
| 205 | ); |
|
| 206 | } |
|
| 207 | ||
| 208 | /** |
|
| 209 | * Test service function for loading sections throwing NotFoundException. |
|
| @@ 243-257 (lines=15) @@ | ||
| 240 | * |
|
| 241 | * @covers \eZ\Publish\Core\Repository\SectionService::loadSectionByIdentifier |
|
| 242 | */ |
|
| 243 | public function testLoadSectionByIdentifier() |
|
| 244 | { |
|
| 245 | $sectionService = $this->repository->getSectionService(); |
|
| 246 | ||
| 247 | $section = $sectionService->loadSectionByIdentifier('standard'); |
|
| 248 | ||
| 249 | $this->assertPropertiesCorrect( |
|
| 250 | array( |
|
| 251 | 'id' => 1, |
|
| 252 | 'name' => 'Standard', |
|
| 253 | 'identifier' => 'standard', |
|
| 254 | ), |
|
| 255 | $section |
|
| 256 | ); |
|
| 257 | } |
|
| 258 | ||
| 259 | /** |
|
| 260 | * Test service function for loading section by identifier throwing NotFoundException. |
|