Completed
Pull Request — master (#468)
by Christophe
01:58
created

MagicCallPatchTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A it_supports_classes_with_invalid_tags() 0 13 1
1
<?php
2
3
namespace Tests\Prophecy\Doubler\ClassPatch;
4
5
use PHPUnit\Framework\TestCase;
6
use Prophecy\Doubler\ClassPatch\MagicCallPatch;
7
use Prophecy\Doubler\Generator\ClassMirror;
8
9
class MagicCallPatchTest extends TestCase
10
{
11
    /**
12
     * @test
13
     */
14
    public function it_supports_classes_with_invalid_tags()
15
    {
16
        $class = new \ReflectionClass('Fixtures\Prophecy\WithPhpdocClass');
17
18
        $mirror = new ClassMirror();
19
        $classNode = $mirror->reflect($class, array());
20
21
        $patch = new MagicCallPatch();
22
23
        $patch->apply($classNode);
24
25
        $this->assertTrue($classNode->hasMethod('name'));
26
    }
27
}
28