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 11language : php
22
3+ sudo : false
4+
5+ notifications :
6+ email :
7+ on_success : never
8+
39php :
4- - 5.4
5- - 5.5
6- - 5.6
710 - 7.0
811 - 7.1
9- - hhvm
12+ - nightly
1013
1114matrix :
15+ fast_finish : true
16+ allow_failures :
17+ - php : nightly
1218 include :
13- - php : 5.4
19+ - php : 7.0
1420 env : dependencies=lowest
1521
1622before_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
1925 - if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-stable -n; fi;
2026
2127script :
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
2430
2531after_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
2121To be able to use EasyMock in your tests ** you must include the trait in your class** :
2222
2323``` php
24- class MyTest extends \PHPUnit_Framework_TestCase
24+ class MyTest extends \PHPUnit\Framework\TestCase
2525{
2626 use \EasyMock\EasyMock;
2727
Original file line number Diff line number Diff line change 1616 }
1717 },
1818 "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"
2121 },
2222 "require-dev" : {
23- "phpunit/phpunit" : " ~4.0|~5.0 "
23+ "phpunit/phpunit" : " ~6.4 "
2424 }
2525}
Original file line number Diff line number Diff line change 77use EasyMock \Test \Fixture \ClassWithConstructor ;
88use EasyMock \Test \Fixture \CustomException ;
99use EasyMock \Test \Fixture \InterfaceFixture ;
10+ use PHPUnit \Framework \TestCase ;
11+ use PHPUnit \Framework \ExpectationFailedException ;
1012
1113/**
1214 * @author Matthieu Napoli <[email protected] > 1315 */
14- class EasyMockTest extends \PHPUnit_Framework_TestCase
16+ class EasyMockTest extends TestCase
1517{
1618 use EasyMock;
1719
@@ -126,7 +128,7 @@ public function should_allow_to_spy_method_calls()
126128 ));
127129
128130 // 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 ' );
130132 $ property ->setAccessible (true );
131133 $ mockObjects = $ property ->getValue ($ this );
132134
@@ -137,7 +139,7 @@ public function should_allow_to_spy_method_calls()
137139 try {
138140 $ mock ->__phpunit_verify ();
139141 $ this ->fail ('Exception not thrown ' );
140- } catch (\ PHPUnit_Framework_ExpectationFailedException $ e ) {
142+ } catch (ExpectationFailedException $ e ) {
141143 $ this ->assertContains ('Expected invocation at least once but it never occur ' , $ e ->getMessage ());
142144 }
143145
You can’t perform that action at this time.
0 commit comments