Workflow/Tests/Factory/TransitionFactoryTest.php
Avoid using static access to class '\Phake' in method 'testCreate'. Open
Open
$statusTo = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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 'testCreate'. Open
Open
$statusFrom = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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\Workflow\Tests\Factory\TransitionFactoryTest::assertSame
Open
Open
$this->assertSame($statusTo, $transition->getStatusTo());
- Create a ticketCreate a ticket
- Exclude checks
Call to method getStatusTo
from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowTransitionInterface
Open
Open
$this->assertSame($statusTo, $transition->getStatusTo());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Factory\TransitionFactoryTest::assertInstanceOf
Open
Open
$this->assertInstanceOf($this->transitionClassName, $transition);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\Workflow\Tests\Factory\TransitionFactoryTest::assertSame
Open
Open
$this->assertSame($statusFrom, $transition->getStatusFrom());
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseBundle\Tests\AbstractTest\AbstractBaseTestCase
Open
Open
class TransitionFactoryTest extends AbstractBaseTestCase
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
Open
$statusFrom = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method mock
from undeclared class \Phake
Open
Open
$statusTo = Phake::mock('OpenOrchestra\ModelInterface\Model\StatusInterface');
- Create a ticketCreate a ticket
- Exclude checks
Call to method getStatusFrom
from undeclared class \OpenOrchestra\ModelInterface\Model\WorkflowTransitionInterface
Open
Open
$this->assertSame($statusFrom, $transition->getStatusFrom());
- Create a ticketCreate a ticket
- Exclude checks