eZ\Publish\Core\Repository\Tests\Service\Integration\SectionBase::testAssignSection PHP Method

testAssignSection() public method

Test service function for assigning section to content.
public testAssignSection ( )
    public function testAssignSection()
    {
        $sectionService = $this->repository->getSectionService();
        $contentService = $this->repository->getContentService();
        $section = $sectionService->loadSection(1);
        $contentInfo = $contentService->loadContentInfo(4);
        self::assertEquals(2, $contentInfo->sectionId);
        $sectionService->assignSection($contentInfo, $section);
        $contentInfo = $contentService->loadContentInfo(4);
        self::assertEquals($section->id, $contentInfo->sectionId);
    }