File tree Expand file tree Collapse file tree 8 files changed +20
-13
lines changed Expand file tree Collapse file tree 8 files changed +20
-13
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 77 >
88 <php >
99 <env name =" SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value =" 1" />
10+ <env name =" SYMFONY_PHPUNIT_REMOVE" value =" symfony/yaml" />
1011 </php >
1112
1213 <testsuites >
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