public function testDeleteContentTypeThrowsBadStateException() { /* BEGIN: Use Case */ $contentTypeService = $this->repository->getContentTypeService(); $commentType = $contentTypeService->loadContentTypeByIdentifier('folder'); // Throws an exception because folder type still has content instances $contentTypeService->deleteContentType($commentType); /* END: Use Case */ }