Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade PHPUnit from 7 to 8 (php 7.2 required) #65

Merged
merged 2 commits into from
Feb 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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