Completed
Push — 1.x ( 0fa590...3b8a3a )
by Théo
01:13
created

test_it_deep_copies_a_DateInterval()   A

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
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 11
rs 9.4285
1
<?php
2
3
namespace DeepCopyTest\TypeFilter\Date;
4
5
use DateInterval;
6
use DeepCopy\TypeFilter\Date\DateIntervalFilter;
7
use PHPUnit_Framework_TestCase;
8
9
/**
10
 * @covers \DeepCopy\TypeFilter\Date\DateIntervalFilter
11
 */
12
class DateIntervalFilterTest extends PHPUnit_Framework_TestCase
13
{
14
    public function test_it_deep_copies_a_DateInterval()
15
    {
16
        $object = new DateInterval('P2D');;
17
18
        $filter = new DateIntervalFilter();
0 ignored issues
show
Deprecated Code introduced by Théo FIDRY
The class DeepCopy\TypeFilter\Date\DateIntervalFilter has been deprecated with message: Will be removed in 2.0. This filter will no longer be necessary in PHP 7.1+.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
19
20
        $copy = $filter->apply($object);
21
22
        $this->assertEquals($object, $copy);
23
        $this->assertNotSame($object, $copy);
24
    }
25
}
26