Skip to content

Commit 807509a

Browse files
committed
minor #6 PHPUnit 6 compatibility (Lctrs)
This PR was squashed before being merged into the 0.4.x-dev branch (closes #6). Discussion ---------- PHPUnit 6 compatibility Commits ------- 14dd54b PHPUnit 6 compatibility
2 parents 0cb34b9 + 14dd54b commit 807509a

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ matrix:
2424
- php: 5.3
2525
env: deps="low"
2626

27+
before_install:
28+
- composer self-update
29+
- composer require 'phpunit/phpunit:^4.8.35|^5.4.3|^6.0' --dev --no-update
30+
2731
install:
2832
- if [ "$deps" = "low" ]; then composer update --prefer-lowest --prefer-stable; fi
2933
- if [ "$deps" = "" ]; then composer install; fi
3034

3135
script:
32-
- phpunit --coverage-clover=coverage.clover
36+
- vendor/bin/phpunit --coverage-clover=coverage.clover
3337
- wget https://scrutinizer-ci.com/ocular.phar
3438
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

src/Test/Unit/Repository/Mapping/StatementRepositoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111

1212
namespace XApi\Repository\Doctrine\Test\Unit\Repository\Mapping;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Xabbuh\XApi\DataFixtures\StatementFixtures;
1516
use XApi\Repository\Doctrine\Mapping\Statement;
1617
use XApi\Repository\Doctrine\Repository\Mapping\StatementRepository;
1718

1819
/**
1920
* @author Christian Flothmann <[email protected]>
2021
*/
21-
abstract class StatementRepositoryTest extends \PHPUnit_Framework_TestCase
22+
abstract class StatementRepositoryTest extends TestCase
2223
{
2324
/**
2425
* @var \PHPUnit_Framework_MockObject_MockObject

tests/Unit/Repository/StatementRepositoryTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace XApi\Repository\Doctrine\Tests\Unit\Repository;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Rhumsaa\Uuid\Uuid as RhumsaUuid;
1516
use Xabbuh\XApi\DataFixtures\StatementFixtures;
1617
use Xabbuh\XApi\DataFixtures\VerbFixtures;
@@ -23,7 +24,7 @@
2324
/**
2425
* @author Christian Flothmann <[email protected]>
2526
*/
26-
class StatementRepositoryTest extends \PHPUnit_Framework_TestCase
27+
class StatementRepositoryTest extends TestCase
2728
{
2829
/**
2930
* @var \PHPUnit_Framework_MockObject_MockObject|\XApi\Repository\Doctrine\Repository\Mapping\StatementRepository
@@ -122,6 +123,8 @@ public function testSaveWithoutFlush()
122123
*/
123124
protected function createMappedStatementRepositoryMock()
124125
{
125-
return $this->getMock('\XApi\Repository\Doctrine\Repository\Mapping\StatementRepository');
126+
return $this
127+
->getMockBuilder('\XApi\Repository\Doctrine\Repository\Mapping\StatementRepository')
128+
->getMock();
126129
}
127130
}

0 commit comments

Comments
 (0)