Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/acceptance/bootstrap/NotificationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public function filterNotificationsBySubjectAndResource(
}

/**
* @Then /^user "([^"]*)" should (?:get|have) a notification with subject "([^"]*)" and message:$/
* @Then /^user "([^"]*)" should get a notification with subject "([^"]*)" and message:$/
*
* @param string $user
* @param string $subject
Expand Down Expand Up @@ -411,10 +411,10 @@ public function userShouldGetANotificationWithMessage(string $user, string $subj
throw new \Exception("Notification was not found even after retrying for 5 seconds.");
}
$expectedMessage = $table->getColumnsHash()[0]['message'];
Assert::assertSame(
Assert::assertStringStartsWith(
$expectedMessage,
$actualMessage,
__METHOD__ . "expected message to be '$expectedMessage' but found'$actualMessage'"
__METHOD__ . "expected message to start with '$expectedMessage' but found'$actualMessage'"
);
}

Expand All @@ -441,10 +441,10 @@ public function userShouldGetNotificationForResourceWithMessage(
if (\count($notification) === 1) {
$actualMessage = str_replace(["\r", "\r"], " ", $notification[0]->message);
$expectedMessage = $table->getColumnsHash()[0]['message'];
Assert::assertSame(
Assert::assertStringStartsWith(
$expectedMessage,
$actualMessage,
__METHOD__ . "expected message to be '$expectedMessage' but found'$actualMessage'"
__METHOD__ . "expected message to start with '$expectedMessage' but found'$actualMessage'"
);
$response = $this->userDeletesNotification($user);
$this->featureContext->theHTTPStatusCodeShouldBe(200, '', $response);
Expand All @@ -462,7 +462,7 @@ public function userShouldGetNotificationForResourceWithMessage(
}

/**
* @Then user :user should not have a notification related to resource :resource with subject :subject
* @Then user :user should not get a notification related to resource :resource with subject :subject
*
* @param string $user
* @param string $resource
Expand Down
Loading