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

DateIntervalFilterTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1
lcom 0
cbo 2

1 Method

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