public function testCountAssignedContents() { $sectionService = $this->repository->getSectionService(); $section = $sectionService->loadSection(1); $contentCount = $sectionService->countAssignedContents($section); self::assertGreaterThan(0, $contentCount); $sectionCreateStruct = $sectionService->newSectionCreateStruct(); $sectionCreateStruct->identifier = 'test'; $sectionCreateStruct->name = 'Test'; $newSection = $sectionService->createSection($sectionCreateStruct); $contentCount = $sectionService->countAssignedContents($newSection); self::assertEquals(0, $contentCount); }