File tree Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Original file line number Diff line number Diff line change 1
1
language : php
2
2
3
+ sudo : false
4
+
5
+ notifications :
6
+ email :
7
+ on_success : never
8
+
3
9
php :
4
- - 5.4
5
- - 5.5
6
- - 5.6
7
10
- 7.0
8
11
- 7.1
9
- - hhvm
12
+ - nightly
10
13
11
14
matrix :
15
+ fast_finish : true
16
+ allow_failures :
17
+ - php : nightly
12
18
include :
13
- - php : 5.4
19
+ - php : 7.0
14
20
env : dependencies=lowest
15
21
16
22
before_script :
17
- - if [[ "$TRAVIS_PHP_VERSION" == '5.6 ' ]]; then composer require satooshi/php-coveralls:dev-master -n ; fi
18
- - if [[ "$TRAVIS_PHP_VERSION" != '5.6 ' ]]; then composer install -n ; fi
23
+ - if [[ $(phpenv version-name) == '7.1 ' ]]; then composer require satooshi/php-coveralls:dev-master -n ; fi
24
+ - if [[ $(phpenv version-name) != '7.1 ' ]]; then composer install -n ; fi
19
25
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-stable -n; fi;
20
26
21
27
script :
22
- - if [[ "$TRAVIS_PHP_VERSION" == '5.6 ' ]]; then vendor/bin/phpunit --coverage-clover clover.xml ; fi
23
- - if [[ "$TRAVIS_PHP_VERSION" != '5.6 ' ]]; then vendor/bin/phpunit ; fi
28
+ - if [[ $(phpenv version-name) == '7.1 ' ]]; then vendor/bin/phpunit --coverage-clover clover.xml ; fi
29
+ - if [[ $(phpenv version-name) != '7.1 ' ]]; then vendor/bin/phpunit ; fi
24
30
25
31
after_script :
26
- - if [[ "$TRAVIS_PHP_VERSION" == '5.6 ' ]]; then php vendor/bin/coveralls -v ; fi
32
+ - if [[ $(phpenv version-name) == '7.1 ' ]]; then php vendor/bin/coveralls -v ; fi
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ $ composer require --dev mnapoli/phpunit-easymock
21
21
To be able to use EasyMock in your tests ** you must include the trait in your class** :
22
22
23
23
``` php
24
- class MyTest extends \PHPUnit_Framework_TestCase
24
+ class MyTest extends \PHPUnit\Framework\TestCase
25
25
{
26
26
use \EasyMock\EasyMock;
27
27
Original file line number Diff line number Diff line change 16
16
}
17
17
},
18
18
"require" : {
19
- "php" : " ~5.4|~ 7.0" ,
20
- "phpunit/phpunit-mock-objects" : " ~2.0|~3 .0"
19
+ "php" : " ~7.0" ,
20
+ "phpunit/phpunit-mock-objects" : " ~4 .0"
21
21
},
22
22
"require-dev" : {
23
- "phpunit/phpunit" : " ~4.0|~5.0 "
23
+ "phpunit/phpunit" : " ~6.4 "
24
24
}
25
25
}
Original file line number Diff line number Diff line change 7
7
use EasyMock \Test \Fixture \ClassWithConstructor ;
8
8
use EasyMock \Test \Fixture \CustomException ;
9
9
use EasyMock \Test \Fixture \InterfaceFixture ;
10
+ use PHPUnit \Framework \TestCase ;
11
+ use PHPUnit \Framework \ExpectationFailedException ;
10
12
11
13
/**
12
14
* @author Matthieu Napoli <[email protected] >
13
15
*/
14
- class EasyMockTest extends \PHPUnit_Framework_TestCase
16
+ class EasyMockTest extends TestCase
15
17
{
16
18
use EasyMock;
17
19
@@ -126,7 +128,7 @@ public function should_allow_to_spy_method_calls()
126
128
));
127
129
128
130
// Test PHPUnit's internals to check that the spy was registered
129
- $ property = new \ReflectionProperty ('PHPUnit_Framework_TestCase ' , 'mockObjects ' );
131
+ $ property = new \ReflectionProperty ('PHPUnit\Framework\TestCase ' , 'mockObjects ' );
130
132
$ property ->setAccessible (true );
131
133
$ mockObjects = $ property ->getValue ($ this );
132
134
@@ -137,7 +139,7 @@ public function should_allow_to_spy_method_calls()
137
139
try {
138
140
$ mock ->__phpunit_verify ();
139
141
$ this ->fail ('Exception not thrown ' );
140
- } catch (\ PHPUnit_Framework_ExpectationFailedException $ e ) {
142
+ } catch (ExpectationFailedException $ e ) {
141
143
$ this ->assertContains ('Expected invocation at least once but it never occur ' , $ e ->getMessage ());
142
144
}
143
145
You can’t perform that action at this time.
0 commit comments