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
2
2
vendor
3
3
tests/data
4
4
tests/migrations
5
+ .phpunit.result.cache
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ language: php
3
3
php:
4
4
- 5.6
5
5
- 7.1
6
+ - 7.2
7
+ - 7.3
6
8
7
9
env:
8
10
- PACKAGE_VERSION=high
@@ -13,10 +15,15 @@ matrix:
13
15
include:
14
16
- php: 5.6
15
17
env: PACKAGE_VERSION=low
18
+ - php: 7.4
19
+ env:
20
+ - MINIMUM_STABILITY=dev
21
+ - PACKAGE_VERSION=high
16
22
17
23
before_script:
18
24
- composer selfupdate
25
+ - if [[ "$MINIMUM_STABILITY" ]]; then composer config minimum-stability $MINIMUM_STABILITY ; fi
19
26
- if [[ "$PACKAGE_VERSION" == "high" ]]; then composer update --prefer-dist; fi
20
27
- if [[ "$PACKAGE_VERSION" == "low" ]]; then composer update --prefer-lowest --prefer-dist; fi
21
28
22
- script: vendor/bin/phpunit
29
+ script: vendor/bin/simple- phpunit
Original file line number Diff line number Diff line change 9
9
}
10
10
],
11
11
"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"
15
15
},
16
16
"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 "
20
20
},
21
21
"autoload": {
22
22
"psr-4": {
29
29
}
30
30
},
31
31
"extra": {
32
- "branch-alias": {"dev-master": "1.0 -dev" }
32
+ "branch-alias": {"dev-master": "1.x -dev" }
33
33
}
34
34
}
Original file line number Diff line number Diff line change 5
5
colors="true"
6
6
bootstrap="vendor/autoload.php"
7
7
>
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>
8
13
9
14
<testsuites>
10
15
<testsuite name="PHPCR migrations Test Suite">
Original file line number Diff line number Diff line change 13
13
14
14
use Jackalope\RepositoryFactoryFilesystem;
15
15
use PHPCR\SimpleCredentials;
16
+ use PHPUnit\Framework\TestCase;
16
17
use Symfony\Component\Filesystem\Filesystem;
17
18
18
- class BaseTestCase extends \PHPUnit_Framework_TestCase
19
+ class BaseTestCase extends TestCase
19
20
{
20
21
protected $session;
21
22
Original file line number Diff line number Diff line change 12
12
namespace PHPCR\Migrations\tests\Functional;
13
13
14
14
use PHPCR\Migrations\BaseTestCase;
15
+ use PHPCR\Migrations\Exception\MigratorException;
15
16
use PHPCR\Migrations\Migrator;
16
17
use PHPCR\Migrations\VersionFinder;
17
18
use PHPCR\Migrations\VersionStorage;
@@ -161,15 +162,16 @@ public function testInitialize()
161
162
162
163
/**
163
164
* It should throw an exception if trying to reiniitialize.
164
- *
165
- * @expectedException PHPCR\Migrations\Exception\MigratorException
166
- * @expectedExceptionMessage Will not re-initialize
167
165
*/
168
166
public function testReinitialize()
169
167
{
170
168
$this->addVersion(self::VERSION1);
171
169
$this->addVersion(self::VERSION2);
170
+
172
171
$this->getMigrator()->initialize();
172
+
173
+ $this->expectException(MigratorException::class);
174
+ $this->expectExceptionMessage('Will not re-initialize');
173
175
$this->getMigrator()->initialize();
174
176
}
175
177
Original file line number Diff line number Diff line change 17
17
use PHPCR\Migrations\VersionFinder;
18
18
use PHPCR\Migrations\VersionStorage;
19
19
use PHPCR\SessionInterface;
20
+ use PHPUnit\Framework\TestCase;
20
21
21
- class MigratorFactoryTest extends \PHPUnit_Framework_TestCase
22
+ class MigratorFactoryTest extends TestCase
22
23
{
23
24
public function testFactory()
24
25
{
Original file line number Diff line number Diff line change 12
12
namespace PHPCR\Migrations\tests\Unit;
13
13
14
14
use PHPCR\Migrations\MigratorUtil;
15
+ use PHPUnit\Framework\TestCase;
15
16
16
- class MigratorUtilTest extends \PHPUnit_Framework_TestCase
17
+ class MigratorUtilTest extends TestCase
17
18
{
18
19
/**
19
20
* It should return the classname of a file.
Original file line number Diff line number Diff line change 13
13
14
14
use PHPCR\Migrations\VersionCollection;
15
15
use PHPCR\Migrations\VersionInterface;
16
+ use PHPUnit\Framework\TestCase;
16
17
17
- class VersionCollectionTest extends \PHPUnit_Framework_TestCase
18
+ class VersionCollectionTest extends TestCase
18
19
{
19
20
const VERSION1 = '201501010000';
20
21
const VERSION2 = '201501020000';
Original file line number Diff line number Diff line change 13
13
14
14
use PHPCR\Migrations\VersionCollection;
15
15
use PHPCR\Migrations\VersionFinder;
16
+ use PHPUnit\Framework\TestCase;
16
17
17
- class VersionFinderTest extends \PHPUnit_Framework_TestCase
18
+ class VersionFinderTest extends TestCase
18
19
{
19
20
public function setUp()
20
21
{
@@ -38,13 +39,11 @@ public function testGetCollection()
38
39
39
40
/**
40
41
* It should do nothing if no migrations paths are given.
41
- *
42
- * @expectedException \RuntimeException
43
- * @expectedExceptionMessage No paths were provided
44
42
*/
45
43
public function testNoMigrationPaths()
46
44
{
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());
49
48
}
50
49
}
You can’t perform that action at this time.
0 commit comments