Completed
Push — master ( 5e1d37...9b264a )
by Beñat
04:46
created

MailerActionSpec::it_is_initializable()   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
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the WPSymfonyForm plugin.
5
 *
6
 * Copyright (c) 2015-2016 LIN3S <[email protected]>
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 spec\LIN3S\WPSymfonyForm\Action;
13
14
use LIN3S\WPSymfonyForm\Action\Action;
15
use LIN3S\WPSymfonyForm\Action\MailerAction;
16
use PhpSpec\ObjectBehavior;
17
use Symfony\Component\Form\FormInterface;
18
19
/**
20
 * Spec file of MailerAction.
21
 *
22
 * @author Beñat Espiña <[email protected]>
23
 */
24
class MailerActionSpec extends ObjectBehavior
25
{
26
    function let()
27
    {
28
        $this->beConstructedWith('[email protected]', '<html>The template</html>', 'The email subject');
29
    }
30
31
    function it_is_initializable()
32
    {
33
        $this->shouldHaveType(MailerAction::class);
34
    }
35
36
    function it_implements_action()
37
    {
38
        $this->shouldImplement(Action::class);
39
    }
40
41
    function it_does_not_execute_because_timber_does_not_found(FormInterface $form)
42
    {
43
        $this->shouldThrow(\InvalidArgumentException::class)->duringExecute($form);
44
    }
45
}
46