Completed
Push — master ( 5f8e8d...f7f008 )
by
unknown
02:18
created

PercentDataTypeTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Netdudes\DataSourceryBundle\Tests\DataType;
3
4
use Netdudes\DataSourceryBundle\DataType\PercentDataType;
5
use Netdudes\DataSourceryBundle\Query\FilterCondition;
6
7 View Code Duplication
class PercentDataTypeTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    /**
10
     * @var PercentDataType
11
     */
12
    private $dataType;
13
14
    public function testExpectedDefaultFilterMethod()
15
    {
16
        $expectedDefaultMethod = FilterCondition::METHOD_NUMERIC_EQ;
17
18
        $this->assertSame($expectedDefaultMethod, $this->dataType->getDefaultFilterMethod());
19
    }
20
21
    public function testExpectedAvailableFilterMethods()
22
    {
23
        $expectedAvailableMethods = [
24
            FilterCondition::METHOD_NUMERIC_GT,
25
            FilterCondition::METHOD_NUMERIC_GTE,
26
            FilterCondition::METHOD_NUMERIC_EQ,
27
            FilterCondition::METHOD_NUMERIC_LTE,
28
            FilterCondition::METHOD_NUMERIC_LT,
29
            FilterCondition::METHOD_NUMERIC_NEQ,
30
        ];
31
32
        $this->assertSame($expectedAvailableMethods, $this->dataType->getAvailableFilterMethods());
33
    }
34
35
    protected function setUp()
36
    {
37
        $this->dataType = new PercentDataType();
38
    }
39
}
40