SerializationDisabledTraitTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A magicClone() 0 5 1
1
<?php
2
namespace SubjectivePHPTest\Spl\Traits;
3
4
/**
5
 * @coversDefaultClass SubjectivePHP\Spl\Traits\SerializationDisabledTrait
6
 */
7
class SerializationDisabledTraitTest extends \PHPUnit\Framework\TestCase
8
{
9
    /**
10
     * Verify basic behavior of __sleep().
11
     *
12
     * @test
13
     * @covers ::__sleep
14
     * @expectedException \BadMethodCallException
15
     *
16
     * @return void
17
     */
18
    public function magicClone()
19
    {
20
        $object = $this->getObjectForTrait('\\SubjectivePHP\\Spl\\Traits\\SerializationDisabledTrait');
21
        serialize($object);
22
    }
23
}
24