File tree 11 files changed +16
-21
lines changed
11 files changed +16
-21
lines changed Original file line number Diff line number Diff line change @@ -9,20 +9,22 @@ matrix:
9
9
- php : 7.1
10
10
env :
11
11
- DEPS_LOWEST=1
12
- - php : 7.2
12
+ - php : 7.4
13
13
env :
14
14
- COVERAGE=1
15
+ - PHPSTAN=1
15
16
- php : nightly
16
17
fast_finish : true
17
18
allow_failures :
18
19
- php : nightly
19
20
20
21
install :
21
- - phpenv config-rm xdebug.ini
22
+ - phpenv config-rm xdebug.ini || true
22
23
- if [[ ${DEPS_LOWEST} == 1 ]]; then composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction; fi
23
24
- if [[ ${DEPS_LOWEST} != 1 ]]; then composer update --prefer-source --no-interaction; fi
24
25
25
26
script :
27
+ - if [[ ${PHPSTAN} == 1 ]]; then ./vendor/bin/phpstan analyse --level 1 ./src/ ./tests/; fi
26
28
- if [[ ${COVERAGE} == 1 ]]; then phpdbg -qrr ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi
27
29
28
30
after_success :
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class FooTest extends \AnyTestCase
34
34
{
35
35
private $foo;
36
36
37
- protected function setUp()
37
+ protected function setUp(): void
38
38
{
39
39
Moka::clean();
40
40
@@ -73,7 +73,7 @@ class FooTest extends TestCase
73
73
{
74
74
use MokaCleanerTrait;
75
75
76
- protected function setUp()
76
+ protected function setUp(): void
77
77
{
78
78
// No call to Moka::clean() needed.
79
79
Original file line number Diff line number Diff line change 47
47
}
48
48
},
49
49
"require" : {
50
- "php" : " >= 7.1" ,
50
+ "php" : " ^ 7.1" ,
51
51
"phpcollection/phpcollection" : " ^0.5" ,
52
52
"phpunit/phpunit" : " ^7.0" ,
53
53
"psr/container" : " ^1.0"
54
54
},
55
55
"require-dev" : {
56
- "friendsofphp/php-cs-fixer" : " ^2.3 " ,
56
+ "friendsofphp/php-cs-fixer" : " ^2.16 " ,
57
57
"mockery/mockery" : " ^1.0" ,
58
58
"phake/phake" : " ^3.0" ,
59
- "phpspec/prophecy" : " ^1.0 " ,
59
+ "phpspec/prophecy" : " ^1.7 " ,
60
60
"phpstan/phpstan" : " ^0.12.8"
61
61
},
62
62
"suggest" : {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ abstract class MokaMockingStrategyTestCase extends TestCase
32
32
/**
33
33
* @return void
34
34
*/
35
- protected function setUp ()
35
+ protected function setUp (): void
36
36
{
37
37
$ this ->namesWithValues = [
38
38
'$property ' => mt_rand (),
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public function testGetProxySuccessWithSameAliasOnly()
63
63
$ this ->assertSame ($ proxy , $ this ->proxyBuilder ->getProxy ('bar ' ));
64
64
}
65
65
66
- protected function setUp ()
66
+ protected function setUp (): void
67
67
{
68
68
$ this ->mockingStrategy = $ this ->getMockBuilder (MockingStrategyInterface::class)
69
69
->disableOriginalConstructor ()
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class ProxyGeneratorTest extends TestCase
17
17
*/
18
18
private $ proxyGenerator ;
19
19
20
- public function setUp ()
20
+ public function setUp (): void
21
21
{
22
22
$ mock = $ this ->getMockBuilder (FooTestClass::class)
23
23
->disableOriginalConstructor ()
Original file line number Diff line number Diff line change @@ -32,13 +32,6 @@ public function testCallStaticSuccess()
32
32
}
33
33
}
34
34
35
- public function testCallStaticFailure ()
36
- {
37
- $ this ->expectException (NotImplementedException::class);
38
-
39
- Moka::foo (\stdClass::class);
40
- }
41
-
42
35
public function testPHPUnitExpectation ()
43
36
{
44
37
/** @var ProxyTrait $proxy */
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class FirstStubMatcherTest extends TestCase
25
25
*/
26
26
private $ arguments = [];
27
27
28
- protected function setUp ()
28
+ protected function setUp (): void
29
29
{
30
30
$ this ->mock = $ this ->getMockBuilder (PhakeMock::class)
31
31
->disableOriginalConstructor ()
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class ProxyContainerTest extends TestCase
20
20
*/
21
21
private $ proxy ;
22
22
23
- protected function setUp ()
23
+ protected function setUp (): void
24
24
{
25
25
$ this ->proxyContainer = new ProxyContainer ();
26
26
/** @var ProxyInterface $proxy */
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class ProxyTraitTest extends TestCase
26
26
*/
27
27
private $ mock ;
28
28
29
- protected function setUp ()
29
+ protected function setUp (): void
30
30
{
31
31
$ this ->proxy = new TestProxy ();
32
32
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class StubSetTest extends TestCase
15
15
*/
16
16
private $ set ;
17
17
18
- protected function setUp ()
18
+ protected function setUp (): void
19
19
{
20
20
$ this ->set = new StubSet ();
21
21
}
You can’t perform that action at this time.
0 commit comments