Completed
Push — example/managing-articles ( a6c159...27a4e5 )
by Loïc
03:23 queued 51s
created

iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
cc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of AppName.
5
 *
6
 * (c) Monofony
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 App\Behat\Context\Ui\Backend;
13
14
use App\Behat\NotificationType;
15
use App\Behat\Service\NotificationCheckerInterface;
16
use Behat\Behat\Context\Context;
17
18
final class NotificationContext implements Context
19
{
20
    /**
21
     * @var NotificationCheckerInterface
22
     */
23
    private $notificationChecker;
24
25
    /**
26
     * @param NotificationCheckerInterface $notificationChecker
27
     */
28
    public function __construct(NotificationCheckerInterface $notificationChecker)
29
    {
30
        $this->notificationChecker = $notificationChecker;
31
    }
32
33
    /**
34
     * @Then I should be notified that it has been successfully created
35
     */
36
    public function iShouldBeNotifiedItHasBeenSuccessfullyCreated()
37
    {
38
        $this->notificationChecker->checkNotification('has been successfully created.', NotificationType::success());
39
    }
40
41
    /**
42
     * @Then I should be notified that it has been successfully edited
43
     */
44
    public function iShouldBeNotifiedThatItHasBeenSuccessfullyEdited()
45
    {
46
        $this->notificationChecker->checkNotification('has been successfully updated.', NotificationType::success());
47
    }
48
49
    /**
50
     * @Then I should be notified that it has been successfully deleted
51
     */
52
    public function iShouldBeNotifiedThatItHasBeenSuccessfullyDeleted()
53
    {
54
        $this->notificationChecker->checkNotification('has been successfully deleted.', NotificationType::success());
55
    }
56
57
    /**
58
     * @Then I should be notified that they have been successfully deleted
59
     */
60
    public function iShouldBeNotifiedThatTheyHaveBeenSuccessfullyDeleted()
61
    {
62
        $this->notificationChecker->checkNotification('have been successfully deleted.', NotificationType::success());
63
    }
64
}
65