eZ\Publish\Core\Repository\Tests\Service\Integration\SectionBase::testDeleteSection PHP Метод

testDeleteSection() публичный Метод

Test service function for deleting sections.
public testDeleteSection ( )
    public function testDeleteSection()
    {
        $sectionService = $this->repository->getSectionService();
        $sectionCreateStruct = $sectionService->newSectionCreateStruct();
        $sectionCreateStruct->identifier = 'test';
        $sectionCreateStruct->name = 'Test';
        $newSection = $sectionService->createSection($sectionCreateStruct);
        $sectionService->deleteSection($newSection);
        try {
            $sectionService->loadSection($newSection->id);
            self::fail('Section is still returned after being deleted');
        } catch (NotFoundException $e) {
            // Do nothing
        }
    }