File tree Expand file tree Collapse file tree 10 files changed +39
-21
lines changed Expand file tree Collapse file tree 10 files changed +39
-21
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,4 @@ composer.lock
22vendor
33tests /data
44tests /migrations
5+ .phpunit.result.cache
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ language: php
33php :
44 - 5.6
55 - 7.1
6+ - 7.2
7+ - 7.3
68
79env :
810 - PACKAGE_VERSION=high
@@ -13,10 +15,15 @@ matrix:
1315 include :
1416 - php : 5.6
1517 env : PACKAGE_VERSION=low
18+ - php : 7.4
19+ env :
20+ - MINIMUM_STABILITY=dev
21+ - PACKAGE_VERSION=high
1622
1723before_script :
1824 - composer selfupdate
25+ - if [[ "$MINIMUM_STABILITY" ]]; then composer config minimum-stability $MINIMUM_STABILITY ; fi
1926 - if [[ "$PACKAGE_VERSION" == "high" ]]; then composer update --prefer-dist; fi
2027 - if [[ "$PACKAGE_VERSION" == "low" ]]; then composer update --prefer-lowest --prefer-dist; fi
2128
22- script : vendor/bin/phpunit
29+ script : vendor/bin/simple- phpunit
Original file line number Diff line number Diff line change 99 }
1010 ],
1111 "require" : {
12- "phpcr/phpcr" : " ~ 2.1" ,
13- "symfony/finder" : " ~ 2.8 || ~ 3.4 || ~4 .0" ,
14- "symfony/console" : " ~ 2.8 || ~ 3.4 || ~4 .0"
12+ "phpcr/phpcr" : " ^ 2.1" ,
13+ "symfony/finder" : " ^ 2.8 || ^ 3.4 || ^4.0 || ^5 .0" ,
14+ "symfony/console" : " ^ 2.8 || ^ 3.4 || ^4.0 || ^5 .0"
1515 },
1616 "require-dev" : {
17- "phpunit /phpunit" : " ~5.7 " ,
18- "jackalope/jackalope-fs" : " dev-master " ,
19- "zendframework /zendsearch" : " @dev "
17+ "symfony /phpunit-bridge " : " ^5.0.4 " ,
18+ "jackalope/jackalope-fs" : " 0.0.* " ,
19+ "handcraftedinthealps /zendsearch" : " ^2.0 "
2020 },
2121 "autoload" : {
2222 "psr-4" : {
2929 }
3030 },
3131 "extra" : {
32- "branch-alias" : {"dev-master" : " 1.0 -dev" }
32+ "branch-alias" : {"dev-master" : " 1.x -dev" }
3333 }
3434}
Original file line number Diff line number Diff line change 55 colors =" true"
66 bootstrap =" vendor/autoload.php"
77 >
8+ <php >
9+ <env name =" SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value =" 1" />
10+ <env name =" SYMFONY_PHPUNIT_REMOVE" value =" symfony/yaml" />
11+ <env name =" SYMFONY_DEPRECATIONS_HELPER" value =" disabled=1" />
12+ </php >
813
914 <testsuites >
1015 <testsuite name =" PHPCR migrations Test Suite" >
Original file line number Diff line number Diff line change 1313
1414use Jackalope \RepositoryFactoryFilesystem ;
1515use PHPCR \SimpleCredentials ;
16+ use PHPUnit \Framework \TestCase ;
1617use Symfony \Component \Filesystem \Filesystem ;
1718
18- class BaseTestCase extends \PHPUnit_Framework_TestCase
19+ class BaseTestCase extends TestCase
1920{
2021 protected $ session ;
2122
Original file line number Diff line number Diff line change 1212namespace PHPCR \Migrations \tests \Functional ;
1313
1414use PHPCR \Migrations \BaseTestCase ;
15+ use PHPCR \Migrations \Exception \MigratorException ;
1516use PHPCR \Migrations \Migrator ;
1617use PHPCR \Migrations \VersionFinder ;
1718use PHPCR \Migrations \VersionStorage ;
@@ -161,15 +162,16 @@ public function testInitialize()
161162
162163 /**
163164 * It should throw an exception if trying to reiniitialize.
164- *
165- * @expectedException PHPCR\Migrations\Exception\MigratorException
166- * @expectedExceptionMessage Will not re-initialize
167165 */
168166 public function testReinitialize ()
169167 {
170168 $ this ->addVersion (self ::VERSION1 );
171169 $ this ->addVersion (self ::VERSION2 );
170+
172171 $ this ->getMigrator ()->initialize ();
172+
173+ $ this ->expectException (MigratorException::class);
174+ $ this ->expectExceptionMessage ('Will not re-initialize ' );
173175 $ this ->getMigrator ()->initialize ();
174176 }
175177
Original file line number Diff line number Diff line change 1717use PHPCR \Migrations \VersionFinder ;
1818use PHPCR \Migrations \VersionStorage ;
1919use PHPCR \SessionInterface ;
20+ use PHPUnit \Framework \TestCase ;
2021
21- class MigratorFactoryTest extends \PHPUnit_Framework_TestCase
22+ class MigratorFactoryTest extends TestCase
2223{
2324 public function testFactory ()
2425 {
Original file line number Diff line number Diff line change 1212namespace PHPCR \Migrations \tests \Unit ;
1313
1414use PHPCR \Migrations \MigratorUtil ;
15+ use PHPUnit \Framework \TestCase ;
1516
16- class MigratorUtilTest extends \PHPUnit_Framework_TestCase
17+ class MigratorUtilTest extends TestCase
1718{
1819 /**
1920 * It should return the classname of a file.
Original file line number Diff line number Diff line change 1313
1414use PHPCR \Migrations \VersionCollection ;
1515use PHPCR \Migrations \VersionInterface ;
16+ use PHPUnit \Framework \TestCase ;
1617
17- class VersionCollectionTest extends \PHPUnit_Framework_TestCase
18+ class VersionCollectionTest extends TestCase
1819{
1920 const VERSION1 = '201501010000 ' ;
2021 const VERSION2 = '201501020000 ' ;
Original file line number Diff line number Diff line change 1313
1414use PHPCR \Migrations \VersionCollection ;
1515use PHPCR \Migrations \VersionFinder ;
16+ use PHPUnit \Framework \TestCase ;
1617
17- class VersionFinderTest extends \PHPUnit_Framework_TestCase
18+ class VersionFinderTest extends TestCase
1819{
1920 public function setUp ()
2021 {
@@ -38,13 +39,11 @@ public function testGetCollection()
3839
3940 /**
4041 * It should do nothing if no migrations paths are given.
41- *
42- * @expectedException \RuntimeException
43- * @expectedExceptionMessage No paths were provided
4442 */
4543 public function testNoMigrationPaths ()
4644 {
47- $ collection = (new VersionFinder (array ()))->getCollection ();
48- $ versions = $ collection ->getAllVersions ();
45+ $ this ->expectException (\RuntimeException::class);
46+ $ this ->expectExceptionMessage ('No paths were provided ' );
47+ $ versionFinder = new VersionFinder (array ());
4948 }
5049}
You can’t perform that action at this time.
0 commit comments