Skip to content

Commit

Permalink
upgrade to PHPUnit 8
Browse files Browse the repository at this point in the history
  • Loading branch information
othillo committed Feb 11, 2020
1 parent 4ba8c7b commit 2191d5e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 26 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
}
},
"require-dev": {
"phpunit/phpunit": "^4.8"
"phpunit/phpunit": "^8.0"
}
}
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
>
<testsuites>
Expand Down
8 changes: 3 additions & 5 deletions test/Qandidate/Stack/RequestId/MonologProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

namespace Qandidate\Stack\RequestId;

use Qandidate\Stack\TestCase;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;

class MonologProcessorTest extends TestCase
{
private $processor;
private $header = 'Foo-Id';

public function setUp()
public function setUp(): void
{
$this->processor = new MonologProcessor($this->header);
}
Expand Down Expand Up @@ -69,9 +69,7 @@ public function it_leaves_the_record_untouched_if_no_request_was_handled()

private function createGetResponseEvent($requestId = false)
{
$getResponseEventMock = $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')
->disableOriginalConstructor()
->getMock();
$getResponseEventMock = $this->createMock('Symfony\Component\HttpKernel\Event\GetResponseEvent');

$request = new Request();

Expand Down
5 changes: 3 additions & 2 deletions test/Qandidate/Stack/RequestIdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Qandidate\Stack;

use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;
Expand All @@ -22,9 +23,9 @@ class RequestIdTest extends TestCase
private $stackedApp;
private $header = 'X-Request-Id';

public function setUp()
public function setUp(): void
{
$this->requestIdGenerator = $this->getMock('Qandidate\Stack\RequestIdGenerator');
$this->requestIdGenerator = $this->createMock('Qandidate\Stack\RequestIdGenerator');
$this->app = new MockApp($this->header);
$this->stackedApp = new RequestId($this->app, $this->requestIdGenerator, $this->header);
}
Expand Down
16 changes: 0 additions & 16 deletions test/Qandidate/Stack/TestCase.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Qandidate\Stack;

use PHPUnit\Framework\TestCase;

class UuidRequestIdGeneratorTest extends TestCase
{
/**
Expand All @@ -20,6 +22,6 @@ public function it_generates_a_string()
{
$generator = new UuidRequestIdGenerator();

$this->assertInternalType('string', $generator->generate());
$this->assertIsString($generator->generate());
}
}

0 comments on commit 2191d5e

Please sign in to comment.