NameTest::test_property_with_closure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 11
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ByTIC\Namefy\Tests;
4
5
use ByTIC\Namefy\Name;
6
7
/**
8
 * Class NameTest
9
 * @package ByTIC\Namefy\Tests
10
 */
11
class NameTest extends AbstractTest
12
{
13
    public function test_property_with_closure()
14
    {
15
        $name = new Name();
16
        $name->setModel(
17
            function () {
18
                return 'post';
19
            }
20
        );
21
22
        self::assertIsString($name->model());
23
        self::assertSame('post', $name->model());
24
    }
25
}
26