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

[5.4] Use namespaced PHPUnit TestCase #17058

Merged
merged 2 commits into from
Dec 30, 2016
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"aws/aws-sdk-php": "~3.0",
"mockery/mockery": "~0.9.4",
"pda/pheanstalk": "~3.0",
"phpunit/phpunit": "~5.4",
"phpunit/phpunit": "~5.7",
"predis/predis": "~1.0",
"symfony/css-selector": "~3.2",
"symfony/dom-crawler": "~3.2"
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthAccessGateTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

use PHPUnit\Framework\TestCase;
use Illuminate\Auth\Access\Gate;
use Illuminate\Container\Container;
use Illuminate\Auth\Access\Response;
use Illuminate\Auth\Access\HandlesAuthorization;

class GateTest extends PHPUnit_Framework_TestCase
class GateTest extends TestCase
{
/**
* @expectedException \InvalidArgumentException
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthDatabaseTokenRepositoryTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class AuthDatabaseTokenRepositoryTest extends PHPUnit_Framework_TestCase
class AuthDatabaseTokenRepositoryTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthDatabaseUserProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class AuthDatabaseUserProviderTest extends PHPUnit_Framework_TestCase
class AuthDatabaseUserProviderTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthEloquentUserProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class AuthEloquentUserProviderTest extends PHPUnit_Framework_TestCase
class AuthEloquentUserProviderTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthGuardTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Auth\Events\Failed;
use Illuminate\Auth\Events\Attempting;
use Illuminate\Auth\Events\Authenticated;
use Symfony\Component\HttpFoundation\Request;

class AuthGuardTest extends PHPUnit_Framework_TestCase
class AuthGuardTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthPasswordBrokerTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Contracts\Auth\PasswordBroker;

class AuthPasswordBrokerTest extends PHPUnit_Framework_TestCase
class AuthPasswordBrokerTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthTokenGuardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

use Illuminate\Http\Request;
use Illuminate\Auth\TokenGuard;
use PHPUnit\Framework\TestCase;
use Illuminate\Contracts\Auth\UserProvider;

class AuthTokenGuardTest extends PHPUnit_Framework_TestCase
class AuthTokenGuardTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthenticateMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

use Mockery as m;
use Illuminate\Http\Request;
use PHPUnit\Framework\TestCase;
use Illuminate\Auth\AuthManager;
use Illuminate\Auth\RequestGuard;
use Illuminate\Container\Container;
use Illuminate\Config\Repository as Config;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Auth\Middleware\Authenticate;

class AuthenticateMiddlewareTest extends PHPUnit_Framework_TestCase
class AuthenticateMiddlewareTest extends TestCase
{
protected $auth;

Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthorizeMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use Mockery as m;
use Illuminate\Http\Request;
use Illuminate\Routing\Router;
use PHPUnit\Framework\TestCase;
use Illuminate\Auth\Access\Gate;
use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container;
Expand All @@ -12,7 +13,7 @@
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;

class AuthorizeMiddlewareTest extends PHPUnit_Framework_TestCase
class AuthorizeMiddlewareTest extends TestCase
{
protected $container;
protected $user;
Expand Down
3 changes: 2 additions & 1 deletion tests/Auth/AuthorizesResourcesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

use Illuminate\Http\Request;
use Illuminate\Routing\Router;
use PHPUnit\Framework\TestCase;
use Illuminate\Routing\Controller;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class AuthorizesResourcesTest extends PHPUnit_Framework_TestCase
class AuthorizesResourcesTest extends TestCase
{
public function testCreateMethod()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Broadcasting/BroadcastEventTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class BroadcastEventTest extends PHPUnit_Framework_TestCase
class BroadcastEventTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Broadcasting/BroadcasterTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Container\Container;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Routing\BindingRegistrar;
use Illuminate\Broadcasting\Broadcasters\Broadcaster;

class BroadcasterTest extends PHPUnit_Framework_TestCase
class BroadcasterTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Bus/BusDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

use Mockery as m;
use Illuminate\Bus\Dispatcher;
use PHPUnit\Framework\TestCase;
use Illuminate\Container\Container;

class BusDispatcherTest extends PHPUnit_Framework_TestCase
class BusDispatcherTest extends TestCase
{
public function tearDown()
{
Expand Down
4 changes: 3 additions & 1 deletion tests/Cache/CacheApcStoreTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

class CacheApcStoreTest extends PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;

class CacheApcStoreTest extends TestCase
{
public function testGetReturnsNullWhenNotFound()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheArrayStoreTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use PHPUnit\Framework\TestCase;
use Illuminate\Cache\ArrayStore;

class CacheArrayStoreTest extends PHPUnit_Framework_TestCase
class CacheArrayStoreTest extends TestCase
{
public function testItemsCanBeSetAndRetrieved()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheDatabaseStoreTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Cache\DatabaseStore;

class CacheDatabaseStoreTest extends PHPUnit_Framework_TestCase
class CacheDatabaseStoreTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheEventsTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Cache\Events\CacheHit;
use Illuminate\Cache\Events\KeyWritten;
use Illuminate\Cache\Events\CacheMissed;
use Illuminate\Cache\Events\KeyForgotten;

class CacheEventTest extends PHPUnit_Framework_TestCase
class CacheEventTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheFileStoreTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

use Illuminate\Cache\FileStore;
use PHPUnit\Framework\TestCase;
use Illuminate\Contracts\Filesystem\FileNotFoundException;

class CacheFileStoreTest extends PHPUnit_Framework_TestCase
class CacheFileStoreTest extends TestCase
{
public function testNullIsReturnedIfFileDoesntExist()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheManagerTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Cache\CacheManager;

class CacheManagerTest extends PHPUnit_Framework_TestCase
class CacheManagerTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheMemcachedConnectorTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class CacheMemcachedConnectorTest extends PHPUnit_Framework_TestCase
class CacheMemcachedConnectorTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheMemcachedStoreTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use PHPUnit\Framework\TestCase;
use Illuminate\Cache\MemcachedStore;

class CacheMemcachedStoreTest extends PHPUnit_Framework_TestCase
class CacheMemcachedStoreTest extends TestCase
{
public function testGetReturnsNullWhenNotFound()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheNullStoreTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Illuminate\Cache\NullStore;
use PHPUnit\Framework\TestCase;

class CacheNullStoreTest extends PHPUnit_Framework_TestCase
class CacheNullStoreTest extends TestCase
{
public function testItemsCanNotBeCached()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheRateLimiterTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Cache\RateLimiter;
use Illuminate\Contracts\Cache\Repository as Cache;

class CacheRateLimiterTest extends PHPUnit_Framework_TestCase
class CacheRateLimiterTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheRedisStoreTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class CacheRedisStoreTest extends PHPUnit_Framework_TestCase
class CacheRedisStoreTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

use Mockery as m;
use Carbon\Carbon;
use PHPUnit\Framework\TestCase;

class CacheRepositoryTest extends PHPUnit_Framework_TestCase
class CacheRepositoryTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheTableCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Foundation\Application;
use Illuminate\Cache\Console\CacheTableCommand;

class CacheTableCommandTest extends PHPUnit_Framework_TestCase
class CacheTableCommandTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/CacheTaggedCacheTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Cache\ArrayStore;

class CacheTaggedCacheTest extends PHPUnit_Framework_TestCase
class CacheTaggedCacheTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/ClearCommandTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Foundation\Application;
use Illuminate\Cache\Console\ClearCommand;

class ClearCommandTest extends PHPUnit_Framework_TestCase
class ClearCommandTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Cache/RedisCacheIntegrationTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Cache\RedisStore;
use Illuminate\Cache\Repository;

class RedisCacheTest extends PHPUnit_Framework_TestCase
class RedisCacheTest extends TestCase
{
use InteractsWithRedis;

Expand Down
3 changes: 2 additions & 1 deletion tests/Config/RepositoryTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use PHPUnit\Framework\TestCase;
use Illuminate\Config\Repository;

class RepositoryTest extends PHPUnit_Framework_TestCase
class RepositoryTest extends TestCase
{
/**
* @var \Illuminate\Config\Repository
Expand Down
3 changes: 2 additions & 1 deletion tests/Console/ConsoleApplicationTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class ConsoleApplicationTest extends PHPUnit_Framework_TestCase
class ConsoleApplicationTest extends TestCase
{
public function tearDown()
{
Expand Down
Loading