CloningDisabledTraitTest::magicClone()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace SubjectivePHPTest\Spl\Traits;
3
4
/**
5
 * @coversDefaultClass SubjectivePHP\Spl\Traits\CloningDisabledTrait
6
 */
7
class CloningDisabledTraitTest extends \PHPUnit\Framework\TestCase
8
{
9
    /**
10
     * Verify basic behavior of _clone().
11
     *
12
     * @test
13
     * @covers ::__clone
14
     * @expectedException \BadMethodCallException
15
     *
16
     * @return void
17
     */
18
    public function magicClone()
19
    {
20
        $object = $this->getObjectForTrait('\\SubjectivePHP\\Spl\\Traits\\CloningDisabledTrait');
21
        clone $object;
22
    }
23
}
24