Code Duplication    Length = 20-20 lines in 2 locations

src/Stp/SndApi/News/Test/Validator/ArticleListMethodValidatorTest.php 1 location

@@ 7-26 (lines=20) @@
4
5
use Stp\SndApi\News\Validator\ArticleListMethodValidator;
6
7
class ArticleListMethodValidatorTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function methodsProvider()
10
    {
11
        return [
12
            ['desked', true],
13
            ['auto', true],
14
            ['invalid', false]
15
        ];
16
    }
17
18
    /**
19
     * @dataProvider methodsProvider
20
     */
21
    public function testValidator($data, $expected)
22
    {
23
        $validator = new ArticleListMethodValidator($data);
24
        $this->assertEquals($expected, $validator->isValid());
25
    }
26
}
27

src/Stp/SndApi/News/Test/Validator/ContentTypeValidatorTest.php 1 location

@@ 7-26 (lines=20) @@
4
5
use Stp\SndApi\News\Validator\ContentTypeValidator;
6
7
class ContentTypeValidatorTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function contentTypeProvider()
10
    {
11
        return [
12
            ['article', true],
13
            ['person', true],
14
            ['invalid', false]
15
        ];
16
    }
17
18
    /**
19
     * @dataProvider contentTypeProvider
20
     */
21
    public function testValidator($contentType, $expected)
22
    {
23
        $validator = new ContentTypeValidator($contentType);
24
        $this->assertEquals($expected, $validator->isValid());
25
    }
26
}
27