TestedTypeTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testSubmitValidData() 0 16 1
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