open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/Tests/Form/Type/Component/DefaultListableCheckboxTypeTest.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\Phake' in method 'testBuildView'.
Open

        $formView = Phake::mock('Symfony\Component\Form\FormView');

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Phake' in method 'testBuildView'.
Open

        $formInterface = Phake::mock('Symfony\Component\Form\FormInterface');

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\DefaultListableCheckboxTypeTest::assertEquals
Open

        $this->assertEquals(CheckboxType::class, $this->form->getParent());

Call to method mock from undeclared class \Phake
Open

        $formView = Phake::mock('Symfony\Component\Form\FormView');

Reference to constant class from undeclared class \Symfony\Component\Form\Extension\Core\Type\CheckboxType
Open

        $this->assertEquals(CheckboxType::class, $this->form->getParent());

Call to method mock from undeclared class \Phake
Open

        $formInterface = Phake::mock('Symfony\Component\Form\FormInterface');

Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open

class DefaultListableCheckboxTypeTest extends AbstractBaseTestCase

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\DefaultListableCheckboxTypeTest::assertEquals
Open

        $this->assertEquals($formView->vars['label'], $label);

Call to undeclared method \OpenOrchestra\Backoffice\Tests\Form\Type\Component\DefaultListableCheckboxTypeTest::assertEquals
Open

        $this->assertEquals('oo_default_listable_checkbox', $this->form->getName());

Line exceeds 120 characters; contains 122 characters
Open

            "Other label" => array('label2', 'open_orchestra_backoffice.form.content_type.default_listable_label.label2'),

There are no issues that match your filters.

Category
Status