Completed
Push — master ( d5f3e2...f413dd )
by Ivo
02:47
created

TestedTypeTest::testSubmitValidData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 16
rs 9.4285
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