<commit_before><?php

namespace ConfigBundle\Tests\Unit\Form\Type;

use Oro\Bundle\ConfigBundle\Form\Type\FormType;

class FormTypeTest extends \PHPUnit_Framework_TestCase
{
    /** @var \PHPUnit_Framework_MockObject_MockObject */
    protected $subscriber;

    /** @var FormType */
    protected $form;

    public function setUp()
    {
        $this->subscriber = $this->getMockBuilder('Oro\Bundle\ConfigBundle\Form\EventListener\ConfigSubscriber')
            ->disableOriginalConstructor()->getMock();
        $this->form       = new FormType($this->subscriber);
    }

    public function tearDown()
    {
        unset($this->subscriber);
        unset($this->form);
    }

    public function testBuildForm()
    {
        $builder = $this->getMockBuilder('Symfony\Component\Form\Test\FormBuilderInterface')
            ->disableOriginalConstructor()->getMock();

        $builder->expects($this->once())->method('addEventSubscriber')->with($this->equalTo($this->subscriber));
        $this->form->buildForm($builder, array());
    }

    public function testGetName()
    {
        $this->assertEquals('oro_config_form_type', $this->form->getName());
    }
}<commit_msg>CRM-935: EWS Integration - fix unit tests<commit_after><?php

namespace ConfigBundle\Tests\Unit\Form\Type;

use Oro\Bundle\ConfigBundle\Form\Type\FormType;

class FormTypeTest extends \PHPUnit_Framework_TestCase
{
    /** @var \PHPUnit_Framework_MockObject_MockObject */
    protected $subscriber;

    /** @var FormType */
    protected $form;

    public function setUp()
    {
        $this->subscriber = $this->getMockBuilder('Oro\Bundle\ConfigBundle\Form\EventListener\ConfigSubscriber')
            ->disableOriginalConstructor()->getMock();
        $this->form       = new FormType($this->subscriber);
    }

    public function tearDown()
    {
        unset($this->subscriber);
        unset($this->form);
    }

    public function testBuildForm()
    {
        $builder = $this->getMockBuilder('Symfony\Component\Form\Test\FormBuilderInterface')
            ->disableOriginalConstructor()->getMock();

        $builder->expects($this->once())->method('addEventSubscriber')->with($this->equalTo($this->subscriber));
        $this->form->buildForm($builder, array('block_config' => []));
    }

    public function testGetName()
    {
        $this->assertEquals('oro_config_form_type', $this->form->getName());
    }
}
{'fraction_non_alphanumeric': 0.151578073089701, 'fraction_numerical': 0.0012458471760797341, 'mean_word_length': 3.309481216457961, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 48, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3109191', 'n_tokens_mistral': 692, 'n_tokens_neox': 682, 'n_words': 95}