TestedTypeTest::testSubmitValidData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
1
<?php
2
3
namespace Ivoaz\Bundle\ContentEditableBundle\Tests\Form\Type;
4
5
use Ivoaz\Bundle\ContentEditableBundle\Form\Model\Content;
6
use Ivoaz\Bundle\ContentEditableBundle\Form\Type\ContentType;
7
use Symfony\Component\Form\Test\TypeTestCase;
8
9
class TestedTypeTest extends TypeTestCase
10
{
11
    public function testSubmitValidData()
12
    {
13
        $formData = array(
14
            'text' => 'Text',
15
        );
16
17
        $form = $this->factory->create(ContentType::class);
18
19
        $object = new Content();
20
        $object->text = 'Text';
21
22
        $form->submit($formData);
23
24
        $this->assertTrue($form->isSynchronized());
25
        $this->assertEquals($object, $form->getData());
26
    }
27
}
28