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

CanInitializeTraitTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_initialize_fire_once() 0 8 1
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
}