@@ 11-46 (lines=36) @@ | ||
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 | public function testSetGetValue() |
|
28 | { |
|
29 | $object = $this->object; |
|
30 | $value = '[email protected]'; |
|
31 | $object->setValue($value); |
|
32 | $this->assertEquals($value, $object->getValue()); |
|
33 | } |
|
34 | ||
35 | public function testGetDefaultAdminType() |
|
36 | { |
|
37 | $this->assertEquals(EmailFormSubmissionType::class, $this->object->getDefaultAdminType()); |
|
38 | } |
|
39 | ||
40 | public function testToString() |
|
41 | { |
|
42 | $stringValue = $this->object->__toString(); |
|
43 | $this->assertNotNull($stringValue); |
|
44 | $this->assertTrue(is_string($stringValue)); |
|
45 | } |
|
46 | } |
|
47 |
@@ 11-46 (lines=36) @@ | ||
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 | public function testSetGetValue() |
|
28 | { |
|
29 | $object = $this->object; |
|
30 | $value = 'test'; |
|
31 | $object->setValue($value); |
|
32 | $this->assertEquals($value, $object->getValue()); |
|
33 | } |
|
34 | ||
35 | public function testGetDefaultAdminType() |
|
36 | { |
|
37 | $this->assertEquals(StringFormSubmissionType::class, $this->object->getDefaultAdminType()); |
|
38 | } |
|
39 | ||
40 | public function testToString() |
|
41 | { |
|
42 | $stringValue = $this->object->__toString(); |
|
43 | $this->assertNotNull($stringValue); |
|
44 | $this->assertTrue(is_string($stringValue)); |
|
45 | } |
|
46 | } |
|
47 |
@@ 11-56 (lines=46) @@ | ||
8 | /** |
|
9 | * Tests for TextFormSubmissionField |
|
10 | */ |
|
11 | class TextFormSubmissionFieldTest extends \PHPUnit_Framework_TestCase |
|
12 | { |
|
13 | /** |
|
14 | * @var TextFormSubmissionField |
|
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 TextFormSubmissionField(); |
|
25 | } |
|
26 | ||
27 | /** |
|
28 | * @covers \Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\TextFormSubmissionField::getValue |
|
29 | * @covers \Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\TextFormSubmissionField::setValue |
|
30 | */ |
|
31 | public function testGetSetValue() |
|
32 | { |
|
33 | $object = $this->object; |
|
34 | $value = 'test'; |
|
35 | $object->setValue($value); |
|
36 | $this->assertEquals($value, $object->getValue()); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @covers \Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\TextFormSubmissionField::getDefaultAdminType |
|
41 | */ |
|
42 | public function testGetDefaultAdminType() |
|
43 | { |
|
44 | $this->assertEquals(TextFormSubmissionType::class, $this->object->getDefaultAdminType()); |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * @covers \Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\TextFormSubmissionField::__toString |
|
49 | */ |
|
50 | public function testToString() |
|
51 | { |
|
52 | $stringValue = $this->object->__toString(); |
|
53 | $this->assertNotNull($stringValue); |
|
54 | $this->assertTrue(is_string($stringValue)); |
|
55 | } |
|
56 | } |
|
57 |