GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AbstractWorkflowFactoryTest::testInitDone()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @link    https://github.com/old-town/old-town-workflow
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\PhpUnitTest\Loader;
7
8
use OldTown\Workflow\Loader\AbstractWorkflowFactory;
9
use PHPUnit_Framework_TestCase as TestCase;
10
use OldTown\Workflow\Util\Properties\Properties;
11
12
13
/**
14
 * Class AbstractWorkflowFactoryTest
15
 *
16
 * @package OldTown\Workflow\PhpUnitTest\Loader
17
 */
18
class AbstractWorkflowFactoryTest extends TestCase
19
{
20
    /**
21
     * @var AbstractWorkflowFactory
22
     */
23
    private $abstractWorkflowFactory;
24
25
26
    /**
27
     *
28
     */
29
    public function setUp()
30
    {
31
        $this->abstractWorkflowFactory = $this->getMockForAbstractClass(AbstractWorkflowFactory::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->getMockForAbstrac...WorkflowFactory::class) of type object<PHPUnit_Framework_MockObject_MockObject> is incompatible with the declared type object<OldTown\Workflow\...bstractWorkflowFactory> of property $abstractWorkflowFactory.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
32
    }
33
34
35
    /**
36
     * Установка Properties через конструктор
37
     *
38
     * @return void
39
     */
40
    public function testSetPropertiesInConstructor()
41
    {
42
        $expectedProperties = new Properties();
43
        /** @var AbstractWorkflowFactory $abstractWorkflowFactory */
44
        $abstractWorkflowFactory = $this->getMockForAbstractClass(AbstractWorkflowFactory::class, ['p' => $expectedProperties]);
45
46
        $actualProperties = $abstractWorkflowFactory->getProperties();
47
48
49
        static::assertTrue($expectedProperties === $actualProperties);
50
    }
51
52
53
    /**
54
     * Проверка работы метода init
55
     *
56
     * @return void
57
     */
58
    public function testInit()
59
    {
60
        $expectedProperties = new Properties();
61
        $this->abstractWorkflowFactory->init($expectedProperties);
62
63
        $actualProperties = $this->abstractWorkflowFactory->getProperties();
64
65
        static::assertTrue($expectedProperties === $actualProperties);
66
    }
67
68
69
    /**
70
     * Проверка работы метода initDone
71
     *
72
     * @return void
73
     */
74
    public function testInitDone()
75
    {
76
        static::assertNull($this->abstractWorkflowFactory->initDone());
77
    }
78
}
79