Code Duplication    Length = 14-14 lines in 2 locations

tests/unit/AllOfFilterTest.php 1 location

@@ 63-76 (lines=14) @@
60
        static::assertFalse($filter->matches(['test' => 'values', 'test2' => 'value2']));
61
    }
62
63
    public function testMultipleChildrenWithTheSamePropertyMatchesAll()
64
    {
65
        $filter = new AllOfFilter([
66
            new ClosureFilter('test', function ($actual) {
67
                return $actual != 'foo';
68
            }),
69
            new ClosureFilter('test', function ($actual) {
70
                return $actual != 'bar';
71
            }),
72
        ]);
73
        static::assertTrue($filter->matches(['test' => 'value']));
74
        static::assertFalse($filter->matches(['test' => 'foo']));
75
        static::assertFalse($filter->matches(['test' => 'bar']));
76
    }
77
78
    public function testCallableFiltersMatchesAll()
79
    {

tests/unit/OneOfFilterTest.php 1 location

@@ 65-78 (lines=14) @@
62
        static::assertFalse($filter->matches(['test' => 'values', 'test2' => 'value3']));
63
    }
64
65
    public function testMultipleChildrenWithTheSamePropertyMatchesOne()
66
    {
67
        $filter = new OneOfFilter([
68
            new ClosureFilter('test', function ($actual) {
69
                return $actual == 'foo';
70
            }),
71
            new ClosureFilter('test', function ($actual) {
72
                return $actual == 'bar';
73
            }),
74
        ]);
75
        static::assertFalse($filter->matches(['test' => 'value']));
76
        static::assertTrue($filter->matches(['test' => 'foo']));
77
        static::assertTrue($filter->matches(['test' => 'bar']));
78
    }
79
80
    public function testCallableFiltersMatchesOne()
81
    {