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