Completed
Push — master ( 13ee85...192638 )
by Ivannis Suárez
02:46
created

CustomTests::shouldVisitMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Cubiche\Core\Comparable\Tests\Units;
12
13
use Cubiche\Core\Comparable\Comparator;
14
15
/**
16
 * Custom Tests class.
17
 *
18
 * @author Ivannis Suárez Jerez <[email protected]>
19
 * @author Karel Osorio Ramírez <[email protected]>
20
 */
21
class CustomTests extends AbstractComparatorTestCase
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected function defaultConstructorArguments()
27
    {
28
        $comparator = new Comparator();
29
30
        return array(function ($a, $b) use ($comparator) {
31
            return $comparator->compare($a % 2, $b % 2);
32
        });
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    protected function compareDataProvider()
39
    {
40
        return array(
41
            array(1, 2, 1),
42
            array(1, 3, 0),
43
            array(4, 1, -1),
44
        );
45
    }
46
}
47