Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21291

ContentService::loadContentByRemoteId fails to load a version if the content has never been published

    XMLWordPrintable

Details

    Description

      The following test in eZ/Publish/Core/Repository/Tests/Service/Integration/ContentBase.php fails. This is due to the fact the loadContentByRemoteId relies on the SearchService which is only able to search content that have been published so if you create a content without publshing it and then try to load it with its remote id, ContentService::loadContentByRemoteId will throw an exception.

          /**
           * Test for the loadContentByRemoteId() method.
           *
           * @covers \eZ\Publish\Core\Repository\ContentService::loadContentByRemoteId
           * @expectedException \eZ\Publish\API\Repository\Exceptions\UnauthorizedException
           */
          public function testLoadContentByRemoteIdWithVersion()
          {
              list( $draft, ) = $this->createTestContent();
      
              $this->repository->getContentService()->loadContentByRemoteId(
                  $draft->contentInfo->remoteId
              );
          }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            damien.pobel-obsolete@ez.no Damien Pobel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: