Skip to content

Commit

Permalink
Merge pull request #65 from romainnorberg/feat-updatePhpUnit
Browse files Browse the repository at this point in the history
Upgrade PHPUnit from 7 to 8 (php 7.2 required)
  • Loading branch information
sebastiandedeyne committed Feb 6, 2019
2 parents 216f571 + 4d7036e commit 05619cb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
}
],
"require": {
"php": "^7.1",
"phpunit/phpunit": "^7.0",
"php": "^7.2",
"phpunit/phpunit": "^8.0",
"symfony/yaml": "^4.2"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/AssertionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AssertionTest extends TestCase
use ComparesSnapshotFiles;
use MatchesSnapshots;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
12 changes: 6 additions & 6 deletions tests/Integration/MatchesSnapshotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
namespace Spatie\Snapshots\Test\Integration;

use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject;
use Spatie\Snapshots\MatchesSnapshots;

class MatchesSnapshotTest extends TestCase
{
use ComparesSnapshotFiles;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down Expand Up @@ -331,7 +331,7 @@ public function it_can_update_a_file_snapshot_with_a_different_extension()
$this->assertFileNotExists($oldSnapshot);
}

private function expectIncompleteMatchesSnapshotTest(PHPUnit_Framework_MockObject_MockObject $matchesSnapshotMock, callable $assertions)
private function expectIncompleteMatchesSnapshotTest(MockObject $matchesSnapshotMock, callable $assertions)
{
$matchesSnapshotMock
->expects($this->once())
Expand All @@ -342,7 +342,7 @@ private function expectIncompleteMatchesSnapshotTest(PHPUnit_Framework_MockObjec
$matchesSnapshotMock->markTestIncompleteIfSnapshotsHaveChanged();
}

private function expectFail(PHPUnit_Framework_MockObject_MockObject $matchesSnapshotMock)
private function expectFail(MockObject $matchesSnapshotMock)
{
$matchesSnapshotMock
->expects($this->once())
Expand All @@ -355,9 +355,9 @@ private function expectFailedMatchesSnapshotTest()
}

/**
* @return \PHPUnit_Framework_MockObject_MockObject
* @return \PHPUnit\Framework\MockObject\MockObject
*/
private function getMatchesSnapshotMock(): PHPUnit_Framework_MockObject_MockObject
private function getMatchesSnapshotMock(): MockObject
{
$mockMethods = [
'markTestIncomplete',
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/SnapshotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SnapshotTest extends TestCase
/** @var \PHPUnit_Framework_MockObject_MockObject */
private $driver;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down

0 comments on commit 05619cb

Please sign in to comment.