open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/Tests/DisplayBlock/DisplayBlockManagerTest.php

Summary

Maintainability
A
0 mins
Test Coverage

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

        $this->templating = Phake::mock('Symfony\Component\Templating\EngineInterface');

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

        Phake::verify($this->defaultStrategy, Phake::never())->show(Phake::anyParameters());

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->strategy = Phake::mock('OpenOrchestra\Backoffice\DisplayBlock\DisplayBlockInterface');

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->defaultStrategy = Phake::mock('OpenOrchestra\Backoffice\DisplayBlock\DisplayBlockInterface');

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

        Phake::when($this->strategy)->support(Phake::anyParameters())->thenReturn(true);

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

        Phake::when($this->strategy)->support(Phake::anyParameters())->thenReturn(false);

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

        Phake::verify($this->defaultStrategy)->show(Phake::anyParameters());

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

        Phake::verify($this->defaultStrategy, Phake::never())->show(Phake::anyParameters());

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->block = Phake::mock('OpenOrchestra\ModelInterface\Model\ReadBlockInterface');

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

        Phake::verify($this->strategy, Phake::never())->toString(Phake::anyParameters());

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

        Phake::verify($this->defaultStrategy, Phake::never())->toString(Phake::anyParameters());

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

        Phake::verify($this->defaultStrategy, Phake::never())->toString(Phake::anyParameters());

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

        Phake::verify($this->strategy)->show(Phake::anyParameters());

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

        Phake::verify($this->strategy, Phake::never())->show(Phake::anyParameters());

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

        Phake::verify($this->strategy, Phake::never())->show(Phake::anyParameters());

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

        Phake::verify($this->strategy, Phake::never())->toString(Phake::anyParameters());

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

        Phake::verify($this->strategy)->toString(Phake::anyParameters());

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

        Phake::verify($this->defaultStrategy)->toString(Phake::anyParameters());

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 method never from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy, Phake::never())->show(Phake::anyParameters());

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy, Phake::never())->toString(Phake::anyParameters());

Call to method mock from undeclared class \Phake
Open

        $this->block = Phake::mock('OpenOrchestra\ModelInterface\Model\ReadBlockInterface');

Call to method never from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy, Phake::never())->toString(Phake::anyParameters());

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy, Phake::never())->show(Phake::anyParameters());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->strategy)->support(Phake::anyParameters())->thenReturn(false);

Call to method when from undeclared class \Phake
Open

        Phake::when($this->strategy)->support(Phake::anyParameters())->thenReturn(false);

Call to method mock from undeclared class \Phake
Open

        $this->templating = Phake::mock('Symfony\Component\Templating\EngineInterface');

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy, Phake::never())->toString(Phake::anyParameters());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->strategy)->toString(Phake::anyParameters());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->strategy, Phake::never())->toString(Phake::anyParameters());

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

class DisplayBlockManagerTest extends AbstractBaseTestCase

Call to method mock from undeclared class \Phake
Open

        $this->strategy = Phake::mock('OpenOrchestra\Backoffice\DisplayBlock\DisplayBlockInterface');

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->strategy, Phake::never())->toString(Phake::anyParameters());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::when($this->strategy)->support(Phake::anyParameters())->thenReturn(true);

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy, Phake::never())->show(Phake::anyParameters());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->strategy)->show(Phake::anyParameters());

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->strategy)->show(Phake::anyParameters());

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->strategy, Phake::never())->show(Phake::anyParameters());

Call to method when from undeclared class \Phake
Open

        Phake::when($this->strategy)->support(Phake::anyParameters())->thenReturn(true);

Call to undeclared method \OpenOrchestra\BackOffice\Tests\DisplayBlock\DisplayBlockManagerTest::assertSame
Open

        $this->assertSame($this->templating, $this->manager->getTemplating());

Call to method mock from undeclared class \Phake
Open

        $this->defaultStrategy = Phake::mock('OpenOrchestra\Backoffice\DisplayBlock\DisplayBlockInterface');

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->strategy, Phake::never())->show(Phake::anyParameters());

Call to method never from undeclared class \Phake
Open

        Phake::verify($this->strategy, Phake::never())->show(Phake::anyParameters());

Call to method never from undeclared class \Phake
Open

        Phake::verify($this->strategy, Phake::never())->toString(Phake::anyParameters());

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->strategy)->toString(Phake::anyParameters());

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy)->show(Phake::anyParameters());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy)->show(Phake::anyParameters());

Call to method verify from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy)->toString(Phake::anyParameters());

Call to method anyParameters from undeclared class \Phake
Open

        Phake::verify($this->defaultStrategy)->toString(Phake::anyParameters());

Function closing brace must go on the next line following the body; found 2 blank lines before brace
Open

    }

There are no issues that match your filters.

Category
Status