Skip to content

Commit

Permalink
TASK: Fix `I expect the content stream "user-cs-identifier" to not ex…
Browse files Browse the repository at this point in the history
…ist`

The step was previously introduced via neos/neos-development-collection@ee0bd14 but wrongly implemented.

see also neos/neos-development-collection#5096 (comment)
  • Loading branch information
mhsdesign committed Oct 1, 2024
1 parent 995e20c commit 5643880
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Classes/Behavior/Features/Bootstrap/CRTestSuiteTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,8 @@ protected function readPayloadTable(TableNode $payloadTable): array
*/
public function iExpectTheContentStreamToNotExist(string $rawContentStreamId): void
{
// todo use, but also it should be assertFAlse?!!! And what about theContentStreamDoesNotExist??
// $this->contentRepository->getContentStreams()
// ->find(fn (ContentStream $contentStream) => $contentStream->id->equals(ContentStreamId::fromString($rawContentStreamId))),
Assert::assertTrue(
$this->currentContentRepository->getContentStreamFinder()->hasContentStream(ContentStreamId::fromString($rawContentStreamId)),
sprintf('The content stream "%s" does exist.', $rawContentStreamId)
);
}

/**
* @Then the content stream :contentStreamId does not exist
*/
public function theContentStreamDoesNotExist(string $contentStreamId): void
{
$contentStream = $this->currentContentRepository->findContentStreamById(ContentStreamId::fromString($contentStreamId));
Assert::assertNull($contentStream, sprintf('Content stream "%s" was not expected to exist, but it does', $contentStreamId));
$contentStream = $this->currentContentRepository->findContentStreamById(ContentStreamId::fromString($rawContentStreamId));
Assert::assertNull($contentStream, sprintf('Content stream "%s" was not expected to exist, but it does', $rawContentStreamId));
}

/**
Expand Down

0 comments on commit 5643880

Please sign in to comment.