PublicationIdValidatorTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A publicationIdProvider() 0 11 1
A testValidator() 0 5 1
1
<?php
2
3
namespace Stp\SndApi\Common\Test\Validator;
4
5
use Stp\SndApi\Common\Validator\PublicationIdValidator;
6
7
class PublicationIdValidatorTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function publicationIdProvider()
10
    {
11
        return [
12
            ['common', true],
13
            ['sa', true],
14
            ['fvn', true],
15
            ['bt', true],
16
            ['ap', true],
17
            ['invalid', false]
18
        ];
19
    }
20
21
    /**
22
     * @dataProvider publicationIdProvider
23
     */
24
    public function testValidator($data, $expected)
25
    {
26
        $validator = new PublicationIdValidator($data);
27
        $this->assertEquals($expected, $validator->isValid());
28
    }
29
}
30