Skip to content

Commit

Permalink
fixup! IBX-7172: loadLocationChildren() not working with multiple obj…
Browse files Browse the repository at this point in the history
…ectstate permissions
  • Loading branch information
vidarl committed Jan 16, 2024
1 parent 03b685d commit 9df0868
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ final class ContentFilteringTest extends BaseRepositoryFilteringTestCase
{
protected function setUp(): void
{
parent::setUp();
$this->getSetupFactory()->getRepository(true);
$this->contentProvider = new TestContentProvider($this->getRepository(true), $this);
parent::setUp();
}

/**
Expand Down Expand Up @@ -360,7 +360,7 @@ public function testObjectStateIdCriterionOnMultipleObjectStates(): void
$objectStateCreateStruct->identifier = 'public';
$objectStateCreateStruct->names = ['eng-GB' => 'Public'];
$objectStateCreateStruct->defaultLanguageCode = 'eng-GB';
$objectStatePublic = $objectStateService->createObjectState($objectStateGroup, $objectStateCreateStruct);
$objectStateService->createObjectState($objectStateGroup, $objectStateCreateStruct);

$objectStateCreateStruct->identifier = 'private';
$objectStateCreateStruct->names = ['eng-GB' => 'Private'];
Expand Down Expand Up @@ -393,7 +393,12 @@ public function testObjectStateIdCriterionOnMultipleObjectStates(): void

$results = $this->find($filter);

self::assertEquals(1, $results->getTotalCount(), 'Expected to find only one object which has state "not_locked" and "private"');
self::assertEquals(
1,
$results->getTotalCount(),
'Expected to find only one object which has state "not_locked" and "private"'
);

/** @var \eZ\Publish\API\Repository\Values\Content\Location $result */
foreach ($results as $result) {
self::assertEquals($result->id, $content->id, 'Expected to find "Private Folder"');
Expand Down

0 comments on commit 9df0868

Please sign in to comment.