Completed
Push — master ( 6f962e...549eec )
by Kamil
21:17
created

iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Sylius\Behat\Context\Ui\Admin;
13
14
use Behat\Behat\Context\Context;
15
use Sylius\Behat\NotificationType;
16
use Sylius\Behat\Service\NotificationCheckerInterface;
17
18
/**
19
 * @author Arkadiusz Krakowiak <[email protected]>
20
 */
21
final class NotificationContext implements Context
22
{
23
    /**
24
     * @var NotificationCheckerInterface
25
     */
26
    private $notificationChecker;
27
28
    /**
29
     * @param NotificationCheckerInterface $notificationChecker
30
     */
31
    public function __construct(NotificationCheckerInterface $notificationChecker)
32
    {
33
        $this->notificationChecker = $notificationChecker;
34
    }
35
36
    /**
37
     * @Then I should be notified that it has been successfully created
38
     */
39
    public function iShouldBeNotifiedItHasBeenSuccessfullyCreated()
40
    {
41
        $this->notificationChecker->checkNotification('has been successfully created.', NotificationType::success());
42
    }
43
44
    /**
45
     * @Then I should be notified that it has been successfully edited
46
     */
47
    public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited()
48
    {
49
        $this->notificationChecker->checkNotification('has been successfully updated.', NotificationType::success());
50
    }
51
52
    /**
53
     * @Then I should be notified that it has been successfully deleted
54
     */
55
    public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted()
56
    {
57
        $this->notificationChecker->checkNotification('has been successfully deleted.', NotificationType::success());
58
    }
59
}
60