Skip to content

Commit

Permalink
Switch to PHPUnit 6 (#17755)
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss authored and taylorotwell committed Feb 9, 2017
1 parent 462019e commit f48aed2
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"doctrine/dbal": "~2.5",
"mockery/mockery": "~0.9.4",
"pda/pheanstalk": "~3.0",
"phpunit/phpunit": "~5.7",
"phpunit/phpunit": "~6.0",
"predis/predis": "~1.0",
"symfony/css-selector": "~3.2",
"symfony/dom-crawler": "~3.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Illuminate\Foundation\Testing\Concerns;

use PHPUnit_Framework_Constraint_Not as ReverseConstraint;
use Illuminate\Foundation\Testing\Constraints\HasInDatabase;
use PHPUnit\Framework\Constraint\LogicalNot as ReverseConstraint;

trait InteractsWithDatabase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Illuminate\Foundation\Testing\Constraints;

use PHPUnit_Framework_Constraint;
use Illuminate\Database\Connection;
use PHPUnit\Framework\Constraint\Constraint;

class HasInDatabase extends PHPUnit_Framework_Constraint
class HasInDatabase extends Constraint
{
/**
* Number of records that will be shown in the console in case of failure.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Testing/HttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Illuminate\Foundation\Testing;

use PHPUnit_Framework_ExpectationFailedException;
use PHPUnit\Framework\ExpectationFailedException;

class HttpException extends PHPUnit_Framework_ExpectationFailedException
class HttpException extends ExpectationFailedException
{
//
}
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/BusFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Illuminate\Support\Testing\Fakes;

use Illuminate\Contracts\Bus\Dispatcher;
use PHPUnit_Framework_Assert as PHPUnit;
use PHPUnit\Framework\Assert as PHPUnit;

class BusFake implements Dispatcher
{
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/EventFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Illuminate\Support\Testing\Fakes;

use PHPUnit_Framework_Assert as PHPUnit;
use PHPUnit\Framework\Assert as PHPUnit;
use Illuminate\Contracts\Events\Dispatcher;

class EventFake implements Dispatcher
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/MailFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Contracts\Mail\Mailer;
use Illuminate\Contracts\Mail\Mailable;
use PHPUnit_Framework_Assert as PHPUnit;
use PHPUnit\Framework\Assert as PHPUnit;

class MailFake implements Mailer
{
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/NotificationFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Ramsey\Uuid\Uuid;
use Illuminate\Support\Collection;
use PHPUnit_Framework_Assert as PHPUnit;
use PHPUnit\Framework\Assert as PHPUnit;
use Illuminate\Contracts\Notifications\Factory as NotificationFactory;

class NotificationFake implements NotificationFactory
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/QueueFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Illuminate\Support\Testing\Fakes;

use Illuminate\Contracts\Queue\Queue;
use PHPUnit_Framework_Assert as PHPUnit;
use PHPUnit\Framework\Assert as PHPUnit;

class QueueFake implements Queue
{
Expand Down
8 changes: 4 additions & 4 deletions tests/Foundation/FoundationInteractsWithDatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testSeeInDatabaseFindsResults()
}

/**
* @expectedException \PHPUnit_Framework_ExpectationFailedException
* @expectedException \PHPUnit\Framework\ExpectationFailedException
* @expectedExceptionMessage The table is empty.
*/
public function testSeeInDatabaseDoesNotFindResults()
Expand All @@ -49,7 +49,7 @@ public function testSeeInDatabaseDoesNotFindResults()
}

/**
* @expectedException \PHPUnit_Framework_ExpectationFailedException
* @expectedException \PHPUnit\Framework\ExpectationFailedException
*/
public function testSeeInDatabaseFindsNotMatchingResults()
{
Expand All @@ -64,7 +64,7 @@ public function testSeeInDatabaseFindsNotMatchingResults()
}

/**
* @expectedException \PHPUnit_Framework_ExpectationFailedException
* @expectedException \PHPUnit\Framework\ExpectationFailedException
*/
public function testSeeInDatabaseFindsManyNotMatchingResults()
{
Expand All @@ -88,7 +88,7 @@ public function testDontSeeInDatabaseDoesNotFindResults()
}

/**
* @expectedException \PHPUnit_Framework_ExpectationFailedException
* @expectedException \PHPUnit\Framework\ExpectationFailedException
* @expectedExceptionMessage a row in the table [products] does not match the attributes {"title":"Spark"}
*/
public function testDontSeeInDatabaseFindsResults()
Expand Down
5 changes: 2 additions & 3 deletions tests/Support/SupportCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use JsonSerializable;
use PHPUnit\Framework\TestCase;
use Illuminate\Support\Collection;
use PHPUnit_Framework_Error_Notice;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contracts\Support\Arrayable;

Expand Down Expand Up @@ -229,7 +228,7 @@ public function testArrayAccessOffsetGet()
}

/**
* @expectedException PHPUnit_Framework_Error_Notice
* @expectedException \PHPUnit\Framework\Error\Notice
*/
public function testArrayAccessOffsetGetOnNonExist()
{
Expand All @@ -249,7 +248,7 @@ public function testArrayAccessOffsetSet()
}

/**
* @expectedException PHPUnit_Framework_Error_Notice
* @expectedException \PHPUnit\Framework\Error\Notice
*/
public function testArrayAccessOffsetUnset()
{
Expand Down

0 comments on commit f48aed2

Please sign in to comment.