for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Behat\Context\Api\Admin;
use Behat\Behat\Context\Context;
use Sylius\Behat\Client\ApiClientInterface;
use Webmozart\Assert\Assert;
final class NotificationContext implements Context
{
/** @var ApiClientInterface */
private $client;
public function __construct(ApiClientInterface $client)
$this->client = $client;
}
/**
* @Then I should be notified that it has been successfully created
public function iShouldBeNotifiedThatItHasBeenSuccessfullyCreated(): void
Assert::true($this->client->isCreationSuccessful(), 'Resource could not be created');
* @Then I should be notified that it has been successfully deleted
public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted(): void
Assert::true($this->client->isDeletionSuccessful(), 'Resource could not be deleted');
* @Then I should be notified that it has been successfully edited
public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited(): void
Assert::true($this->client->isUpdateSuccessful(), 'Resource could not be edited');