Passed
Push — master ( c23f2d...27e589 )
by Gabriel
11:22 queued 11s
created

test_initialize_fire_once()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Nip\Form\Tests\Traits;
4
5
use Mockery;
6
use Nip\Form\Form;
7
use Nip\Form\Tests\AbstractTest;
8
9
/**
10
 * Class CanInitializeTraitTest
11
 * @package Nip\Form\Tests\Traits
12
 */
13
class CanInitializeTraitTest extends AbstractTest
14
{
15
    public function test_initialize_fire_once()
16
    {
17
        /** @var Mockery\Mock|Form $form */
18
        $form = Mockery::mock(Form::class)->makePartial()->shouldAllowMockingProtectedMethods();
19
        $form->shouldReceive('initAction')->once();
20
21
        $form->init();
22
        $form->initialize();
23
    }
24
}