Code Duplication    Length = 54-54 lines in 3 locations

src/Kunstmaan/FormBundle/Tests/Entity/FormSubmissionFieldTypes/EmailFormSubmissionFieldTest.php 1 location

@@ 11-64 (lines=54) @@
8
/**
9
 * Tests for EmailFormSubmissionField
10
 */
11
class EmailFormSubmissionFieldTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @var EmailFormSubmissionField
15
     */
16
    protected $object;
17
18
    /**
19
     * Sets up the fixture, for example, opens a network connection.
20
     * This method is called before a test is executed.
21
     */
22
    protected function setUp()
23
    {
24
        $this->object = new EmailFormSubmissionField;
25
    }
26
27
    /**
28
     * Tears down the fixture, for example, closes a network connection.
29
     * This method is called after a test is executed.
30
     */
31
    protected function tearDown()
32
    {
33
    }
34
35
    /**
36
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\EmailFormSubmissionField::getValue
37
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\EmailFormSubmissionField::setValue
38
     */
39
    public function testSetGetValue()
40
    {
41
        $object = $this->object;
42
        $value = '[email protected]';
43
        $object->setValue($value);
44
        $this->assertEquals($value, $object->getValue());
45
    }
46
47
    /**
48
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\EmailFormSubmissionField::getDefaultAdminType
49
     */
50
    public function testGetDefaultAdminType()
51
    {
52
        $this->assertEquals(EmailFormSubmissionType::class, $this->object->getDefaultAdminType());
53
    }
54
55
    /**
56
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\EmailFormSubmissionField::__toString
57
     */
58
    public function testToString()
59
    {
60
        $stringValue = $this->object->__toString();
61
        $this->assertNotNull($stringValue);
62
        $this->assertTrue(is_string($stringValue));
63
    }
64
}
65

src/Kunstmaan/FormBundle/Tests/Entity/FormSubmissionFieldTypes/StringFormSubmissionFieldTest.php 1 location

@@ 11-64 (lines=54) @@
8
/**
9
 * Tests for StringFormSubmissionField
10
 */
11
class StringFormSubmissionFieldTest extends \PHPUnit_Framework_TestCase
12
{
13
    /**
14
     * @var StringFormSubmissionField
15
     */
16
    protected $object;
17
18
    /**
19
     * Sets up the fixture, for example, opens a network connection.
20
     * This method is called before a test is executed.
21
     */
22
    protected function setUp()
23
    {
24
        $this->object = new StringFormSubmissionField;
25
    }
26
27
    /**
28
     * Tears down the fixture, for example, closes a network connection.
29
     * This method is called after a test is executed.
30
     */
31
    protected function tearDown()
32
    {
33
    }
34
35
    /**
36
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\StringFormSubmissionField::getValue
37
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\StringFormSubmissionField::setValue
38
     */
39
    public function testSetGetValue()
40
    {
41
        $object = $this->object;
42
        $value = 'test';
43
        $object->setValue($value);
44
        $this->assertEquals($value, $object->getValue());
45
    }
46
47
    /**
48
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\StringFormSubmissionField::getDefaultAdminType
49
     */
50
    public function testGetDefaultAdminType()
51
    {
52
        $this->assertEquals(StringFormSubmissionType::class, $this->object->getDefaultAdminType());
53
    }
54
55
    /**
56
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\StringFormSubmissionField::__toString
57
     */
58
    public function testToString()
59
    {
60
        $stringValue = $this->object->__toString();
61
        $this->assertNotNull($stringValue);
62
        $this->assertTrue(is_string($stringValue));
63
    }
64
}
65

src/Kunstmaan/FormBundle/Tests/Entity/FormSubmissionFieldTypes/TextFormSubmissionFieldTest.php 1 location

@@ 9-62 (lines=54) @@
6
/**
7
 * Tests for TextFormSubmissionField
8
 */
9
class TextFormSubmissionFieldTest extends \PHPUnit_Framework_TestCase
10
{
11
    /**
12
     * @var TextFormSubmissionField
13
     */
14
    protected $object;
15
16
    /**
17
     * Sets up the fixture, for example, opens a network connection.
18
     * This method is called before a test is executed.
19
     */
20
    protected function setUp()
21
    {
22
        $this->object = new TextFormSubmissionField;
23
    }
24
25
    /**
26
     * Tears down the fixture, for example, closes a network connection.
27
     * This method is called after a test is executed.
28
     */
29
    protected function tearDown()
30
    {
31
    }
32
33
    /**
34
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\TextFormSubmissionField::getValue
35
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\TextFormSubmissionField::setValue
36
     */
37
    public function testGetSetValue()
38
    {
39
        $object = $this->object;
40
        $value = 'test';
41
        $object->setValue($value);
42
        $this->assertEquals($value, $object->getValue());
43
    }
44
45
    /**
46
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\TextFormSubmissionField::getDefaultAdminType
47
     */
48
    public function testGetDefaultAdminType()
49
    {
50
        $this->assertEquals(TextFormSubmissionType::class, $this->object->getDefaultAdminType());
51
    }
52
53
    /**
54
     * @covers Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\TextFormSubmissionField::__toString
55
     */
56
    public function testToString()
57
    {
58
        $stringValue = $this->object->__toString();
59
        $this->assertNotNull($stringValue);
60
        $this->assertTrue(is_string($stringValue));
61
    }
62
}
63