NameTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_property_with_closure() 0 11 1
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