NullEncoderTest::getEncoder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Vectorface\SnappyRouterTests\Encoder;
4
5
use Vectorface\SnappyRouter\Encoder\NullEncoder;
6
7
/**
8
 * Tests the NullEncoder class.
9
 * @copyright Copyright (c) 2014, VectorFace, Inc.
10
 * @author Dan Bruce <[email protected]>
11
 */
12
class NullEncoderTest extends AbstractEncoderTest
13
{
14
    /**
15
     * Returns the encoder to be tested.
16
     * @return \Vectorface\SnappyRouter\Encoder\AbstractEncoder Returns an instance of an encoder.
17
     */
18
    public function getEncoder()
19
    {
20
        return new NullEncoder();
21
    }
22
23
    /**
24
     * A data provider for the testEncode method.
25
     */
26
    public function encodeProvider()
27
    {
28
        return array(
29
            array(
30
                'test1234',
31
                'test1234'
32
            ),
33
            array(
34
                '',
35
                null
36
            )
37
        );
38
    }
39
}
40