function it_throws_exception_when_flash_was_not_set(ShowPageInterface $shippingMethodShowPage) { $shippingMethodShowPage->flashContainsMessage('Cannot delete, the shipping method is in use.')->willReturn(false); $this->shouldThrow(NotEqualException::class)->during('iShouldBeNotifiedItIsUsed'); }
/** * @Then I should be notified that it is in use */ public function iShouldBeNotifiedItIsUsed() { $message = 'Cannot delete, the shipping method is in use.'; expect($this->shippingMethodShowPage->flashContainsMessage($message))->toBe(true); }