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

Updated to PHPUnit 6 #557

Closed
wants to merge 2 commits into from
Closed
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 @@ -32,7 +32,7 @@
},
"require-dev": {
"mockery/mockery": "~0.9",
"phpunit/phpunit": "~5.0"
"phpunit/phpunit": "~6.0"
},
"autoload": {
"psr-4": {
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
Expand Down
3 changes: 2 additions & 1 deletion tests/AccessTokenControllerTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

use PHPUnit\Framework\TestCase;
use Illuminate\Container\Container;
use Illuminate\Contracts\Debug\ExceptionHandler;

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

use PHPUnit\Framework\TestCase;
use Illuminate\Encryption\Encrypter;
use Laravel\Passport\ApiTokenCookieFactory;

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

use PHPUnit\Framework\TestCase;
use League\OAuth2\Server\AuthorizationServer;

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

use PHPUnit\Framework\TestCase;
use Illuminate\Container\Container;
use League\OAuth2\Server\AuthorizationServer;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Contracts\Routing\ResponseFactory;

class AuthorizationControllerTest extends PHPUnit_Framework_TestCase
class AuthorizationControllerTest extends TestCase
{
public function tearDown()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/AuthorizedAccessTokenControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
use Mockery\Mock;
use Illuminate\Http\Request;
use Laravel\Passport\Client;
use PHPUnit\Framework\TestCase;
use Laravel\Passport\TokenRepository;
use Laravel\Passport\Http\Controllers\AuthorizedAccessTokenController;

class AuthorizedAccessTokenControllerTest extends PHPUnit_Framework_TestCase
class AuthorizedAccessTokenControllerTest extends TestCase
{
/**
* @var Mock|TokenRepository
Expand Down
3 changes: 2 additions & 1 deletion tests/BridgeAccessTokenRepositoryTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

use Carbon\Carbon;
use PHPUnit\Framework\TestCase;

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

use PHPUnit\Framework\TestCase;
use Laravel\Passport\Bridge\ClientRepository;

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

use Laravel\Passport\Passport;
use PHPUnit\Framework\TestCase;
use Laravel\Passport\Bridge\Scope;
use Laravel\Passport\Bridge\Client;
use Laravel\Passport\Bridge\ScopeRepository;

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

use Illuminate\Http\Request;
use PHPUnit\Framework\TestCase;
use Laravel\Passport\Http\Middleware\CheckClientCredentials;

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

use PHPUnit\Framework\TestCase;
use Laravel\Passport\Http\Middleware\CheckForAnyScope as CheckScopes;

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

use PHPUnit\Framework\TestCase;
use Laravel\Passport\Http\Middleware\CheckScopes;

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

use Illuminate\Http\Request;
use PHPUnit\Framework\TestCase;

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

use PHPUnit\Framework\TestCase;
use Illuminate\Contracts\Routing\ResponseFactory;

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

use PHPUnit\Framework\TestCase;
use Illuminate\Container\Container;

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

use PHPUnit\Framework\TestCase;

function storage_path($file = null)
{
return __DIR__.DIRECTORY_SEPARATOR.$file;
Expand All @@ -10,7 +12,7 @@ function custom_path($file = null)
return __DIR__.DIRECTORY_SEPARATOR.'files'.DIRECTORY_SEPARATOR.$file;
}

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

use Laravel\Passport\Passport;
use PHPUnit\Framework\TestCase;

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

use Illuminate\Http\Request;
use Laravel\Passport\Passport;
use PHPUnit\Framework\TestCase;
use Laravel\Passport\TokenRepository;

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

class PersonalAccessTokenFactoryTest extends PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;

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

class ScopeTest extends PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;

class ScopeTest extends TestCase
{
public function test_scope_can_be_converted_to_array()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/TokenGuardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
use Carbon\Carbon;
use Firebase\JWT\JWT;
use Illuminate\Http\Request;
use PHPUnit\Framework\TestCase;
use Illuminate\Container\Container;
use Laravel\Passport\Guards\TokenGuard;

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

class TokenTest extends PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;

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

use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Cookie;

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

class TransientTokenTest extends PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase;

class TransientTokenTest extends TestCase
{
public function test_transient_token_can_do_anything()
{
Expand Down