Code Duplication    Length = 27-27 lines in 3 locations

tests/FwlibTest/Html/Generator/Helper/CheckOnBlurPropertyTraitTest.php 1 location

@@ 12-38 (lines=27) @@
9
 * @copyright   Copyright 2015 Fwolf
10
 * @license     http://www.gnu.org/licenses/lgpl.html LGPL-3.0+
11
 */
12
class CheckOnBlurPropertyTraitTest extends PHPUnitTestCase
13
{
14
    /**
15
     * @param   string[] $methods
16
     * @return  MockObject|CheckOnBlurPropertyTrait
17
     */
18
    protected function buildMock(array $methods = null)
19
    {
20
        $mock = $this->getMockBuilder(CheckOnBlurPropertyTrait::class)
21
            ->setMethods($methods)
22
            ->getMockForTrait();
23
24
        return $mock;
25
    }
26
27
28
    public function testAccessors()
29
    {
30
        $trait = $this->buildMock();
31
32
        $trait->setCheckOnBlur(true);
33
        $this->assertTrue($trait->isCheckOnBlur());
34
35
        $trait->setCheckOnBlur(false);
36
        $this->assertFalse($trait->isCheckOnBlur());
37
    }
38
}
39

tests/FwlibTest/Html/Generator/Helper/CheckOnKeyupPropertyTraitTest.php 1 location

@@ 12-38 (lines=27) @@
9
 * @copyright   Copyright 2015 Fwolf
10
 * @license     http://www.gnu.org/licenses/lgpl.html LGPL-3.0+
11
 */
12
class CheckOnKeyupPropertyTraitTest extends PHPUnitTestCase
13
{
14
    /**
15
     * @param   string[] $methods
16
     * @return  MockObject|CheckOnKeyupPropertyTrait
17
     */
18
    protected function buildMock(array $methods = null)
19
    {
20
        $mock = $this->getMockBuilder(CheckOnKeyupPropertyTrait::class)
21
            ->setMethods($methods)
22
            ->getMockForTrait();
23
24
        return $mock;
25
    }
26
27
28
    public function testAccessors()
29
    {
30
        $trait = $this->buildMock();
31
32
        $trait->setCheckOnKeyup(true);
33
        $this->assertTrue($trait->isCheckOnKeyup());
34
35
        $trait->setCheckOnKeyup(false);
36
        $this->assertFalse($trait->isCheckOnKeyup());
37
    }
38
}
39

tests/FwlibTest/Html/Generator/Helper/CheckOnSubmitPropertyTraitTest.php 1 location

@@ 12-38 (lines=27) @@
9
 * @copyright   Copyright 2015 Fwolf
10
 * @license     http://www.gnu.org/licenses/lgpl.html LGPL-3.0+
11
 */
12
class CheckOnSubmitPropertyTraitTest extends PHPUnitTestCase
13
{
14
    /**
15
     * @param   string[] $methods
16
     * @return  MockObject|CheckOnSubmitPropertyTrait
17
     */
18
    protected function buildMock(array $methods = null)
19
    {
20
        $mock = $this->getMockBuilder(CheckOnSubmitPropertyTrait::class)
21
            ->setMethods($methods)
22
            ->getMockForTrait();
23
24
        return $mock;
25
    }
26
27
28
    public function testAccessors()
29
    {
30
        $trait = $this->buildMock();
31
32
        $trait->setCheckOnSubmit(true);
33
        $this->assertTrue($trait->isCheckOnSubmit());
34
35
        $trait->setCheckOnSubmit(false);
36
        $this->assertFalse($trait->isCheckOnSubmit());
37
    }
38
}
39