Completed
Push — master ( 192638...f858f1 )
by Ivannis Suárez
05:02
created

ComparatorTestCase::compareDataProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 6
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
use Cubiche\Core\Comparable\Tests\Fixtures\Value;
15
16
/**
17
 * Comparator Test Case Class.
18
 *
19
 * @author Ivannis Suárez Jerez <[email protected]>
20
 * @author Karel Osorio Ramírez <[email protected]>
21
 */
22
abstract class ComparatorTestCase extends ComparatorInterfaceTestCase
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function compareDataProvider()
28
    {
29
        return array(
30
            array(1, 2, -1),
31
            array(new Value(1), 1, 0),
32
            array(1, new Value(0), 1),
33
            array(new Value(1), new Value(2), -1),
34
        );
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    protected function newDefaultOtherwiseComparator()
41
    {
42
        return new Comparator();
43
    }
44
}
45