open-orchestra/open-orchestra-cms-bundle

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

Summary

Maintainability
A
0 mins
Test Coverage

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

        $this->transformer = Phake::mock('Symfony\Component\Form\DataTransformerInterface');

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 'testConfigureOptions'.
Open

        $resolver = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');

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 'setUp'.
Open

        $this->builder = Phake::mock('Symfony\Component\Form\FormBuilder');

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

        $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

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

class CheckListCollectionTypeTest extends AbstractBaseTestCase

Call to method verify from undeclared class \Phake
Open

        Phake::verify($resolver)->setDefaults(

Saw an @param annotation for name, but it was not found in the param list of function testBuildView($propertyPath, $expectedResult)
Open

     * @param $name

Call to method mock from undeclared class \Phake
Open

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

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

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

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->builder)->addModelTransformer($this->transformer);

Call to method mock from undeclared class \Phake
Open

        $resolver = Phake::mock('Symfony\Component\OptionsResolver\OptionsResolver');

Call to method mock from undeclared class \Phake
Open

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

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->builder)->add('check_list_collection', 'collection', array(

Saw an @param annotation for label, but it was not found in the param list of function testBuildView($propertyPath, $expectedResult)
Open

     * @param $label

Call to method mock from undeclared class \Phake
Open

        $this->builder = Phake::mock('Symfony\Component\Form\FormBuilder');

Call to method mock from undeclared class \Phake
Open

        $this->transformer = Phake::mock('Symfony\Component\Form\DataTransformerInterface');

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

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

Closing parenthesis of a multi-line function call must be on a line by itself
Open

        ));

There are no issues that match your filters.

Category
Status