These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\FormBundle\Tests\Entity\FormSubmissionFieldTypes; |
||
4 | |||
5 | use Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\StringFormSubmissionField; |
||
6 | use Kunstmaan\FormBundle\Form\StringFormSubmissionType; |
||
7 | use PHPUnit\Framework\TestCase; |
||
8 | |||
9 | /** |
||
10 | * Tests for StringFormSubmissionField |
||
11 | */ |
||
12 | View Code Duplication | 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); |
||
0 ignored issues
–
show
|
|||
46 | } |
||
47 | } |
||
48 |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.