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

Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion tests/JsonResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@


use FastD\Http\JsonResponse;
use PHPUnit\Framework\TestCase;

class JsonResponseTest extends PHPUnit_Framework_TestCase
class JsonResponseTest extends TestCase
{
public function testResponseJson()
{
Expand Down
5 changes: 4 additions & 1 deletion tests/MessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
* @link https://www.github.com/janhuang
* @link http://www.fast-d.cn/
*/
class MessageTest extends PHPUnit_Framework_TestCase

use PHPUnit\Framework\TestCase;

class MessageTest extends TestCase
{
/**
* @var Message
Expand Down
5 changes: 4 additions & 1 deletion tests/PhpInputStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
* @link https://www.github.com/janhuang
* @link http://www.fast-d.cn/
*/
class PhpInputStreamTest extends PHPUnit_Framework_TestCase

use PHPUnit\Framework\TestCase;

class PhpInputStreamTest extends TestCase
{
/**
* @var \Psr\Http\Message\StreamInterface
Expand Down
4 changes: 2 additions & 2 deletions tests/RedirectResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

use FastD\Http\RedirectResponse;
use FastD\Http\Response;
use PHPUnit\Framework\TestCase;


class RedirectResponseTest extends PHPUnit_Framework_TestCase
class RedirectResponseTest extends TestCase
{
public function testResponseRedirect()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/RequestTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
use FastD\Http\Request;
use FastD\Http\Uri;
use PHPUnit\Framework\TestCase;

/**
* @author jan huang <bboyjanhuang@gmail.com>
Expand All @@ -9,7 +10,7 @@
* @link https://www.github.com/janhuang
* @link http://www.fast-d.cn/
*/
class RequestTest extends PHPUnit_Framework_TestCase
class RequestTest extends TestCase
{
public function testRequestUri()
{
Expand Down
5 changes: 3 additions & 2 deletions tests/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
use FastD\Http\Cookie;
use FastD\Http\Response;
use Psr\Http\Message\ResponseInterface;
use PHPUnit\Framework\TestCase;

class ResponseTest extends \PHPUnit_Framework_TestCase
class ResponseTest extends TestCase
{
/**
* @var Response
Expand Down Expand Up @@ -96,4 +97,4 @@ public function testResponseCookie()
$this->response->withCookie('age', 11);
$this->outputResponse($this->response);
}
}
}
3 changes: 2 additions & 1 deletion tests/ServerRequestTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
use FastD\Http\PhpInputStream;
use FastD\Http\ServerRequest;
use PHPUnit\Framework\TestCase;

/**
*
Expand All @@ -10,7 +11,7 @@
* @link https://www.github.com/janhuang
* @link http://www.fast-d.cn/
*/
class ServerRequestTest extends PHPUnit_Framework_TestCase
class ServerRequestTest extends TestCase
{
public function dataInputFromGlobals()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/StreamTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
use FastD\Http\Stream;
use PHPUnit\Framework\TestCase;

/**
*
Expand All @@ -9,7 +10,7 @@
* @link https://www.github.com/janhuang
* @link http://www.fast-d.cn/
*/
class StreamTest extends PHPUnit_Framework_TestCase
class StreamTest extends TestCase
{
/**
* @var Stream
Expand Down
3 changes: 2 additions & 1 deletion tests/SwooleServerRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@


use FastD\Http\SwooleServerRequest;
use PHPUnit\Framework\TestCase;

if (!class_exists('swoole_http_request')) {
class swoole_http_request
Expand All @@ -31,7 +32,7 @@ public function rawContent()
define('SWOOLE_VERSION', '1.8.0');
}

class SwooleServerRequestTest extends PHPUnit_Framework_TestCase
class SwooleServerRequestTest extends TestCase
{
public function dataFromSwoole()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/UriTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
use FastD\Http\Uri;
use PHPUnit\Framework\TestCase;

/**
*
Expand All @@ -9,7 +10,7 @@
* @link https://www.github.com/janhuang
* @link http://www.fast-d.cn/
*/
class UriTest extends PHPUnit_Framework_TestCase
class UriTest extends TestCase
{
/**
* @expectedException InvalidArgumentException
Expand Down