1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 18:04:08 +02:00

bump phpunit

This commit is contained in:
Robin Appelman 2019-04-12 13:36:56 +02:00
commit a17fad62e7
14 changed files with 291 additions and 342 deletions

View file

@ -12,7 +12,7 @@ class ChatProviderTest extends TestCase {
/** @var ChatProvider */
private $provider;
public function setUp() {
public function setUp(): void {
parent::setUp();
$this->provider = new ChatProvider($this->getDatabaseConnection());

View file

@ -22,7 +22,7 @@ class DemoListProviderTest extends TestCase {
/** @var UserProvider */
private $userProvider;
public function setUp() {
public function setUp(): void {
parent::setUp();
$this->demoListProvider = new DemoListProvider($this->getDatabaseConnection());

View file

@ -27,7 +27,7 @@ class DemoProviderTest extends TestCase {
/** @var KillProvider */
private $killProvider;
public function setUp() {
public function setUp(): void {
parent::setUp();
$this->provider = new DemoProvider($this->getDatabaseConnection());

View file

@ -20,6 +20,7 @@ use Demostf\API\Providers\UploadProvider;
use Demostf\API\Providers\UserProvider;
use Demostf\API\Test\TestCase;
use Doctrine\DBAL\Connection;
use InvalidArgumentException;
class UploadProviderTest extends TestCase {
/** @var RawParser */
@ -41,7 +42,7 @@ class UploadProviderTest extends TestCase {
/** @var string */
private $tmpDir;
public function setUp() {
public function setUp(): void {
parent::setUp();
$this->rawParser = $this->getMockBuilder(RawParser::class)
@ -104,7 +105,7 @@ class UploadProviderTest extends TestCase {
rmdir($dir);
}
public function tearDown() {
public function tearDown(): void {
$this->rmdirr($this->tmpDir);
parent::tearDown();
@ -212,11 +213,10 @@ class UploadProviderTest extends TestCase {
);
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Not an HL2 demo
*/
public function testUploadNonDemo() {
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage("Not an HL2 demo");
file_put_contents($this->tmpDir . '/foo.dem', 'asd');
$steamId = $this->getSteamId('123', 'a');
@ -310,11 +310,10 @@ class UploadProviderTest extends TestCase {
$this->assertEquals(3, $demo->getRedScore());
}
/**
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Not an HL2 demo
*/
public function testUploadKey() {
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage("Not an HL2 demo");
$uploadProvider = new UploadProvider(
$this->getDatabaseConnection(),
'http://example.com',

View file

@ -18,7 +18,7 @@ class UserProviderTest extends TestCase {
/** @var \SteamId */
private $steamId;
public function setUp() {
public function setUp(): void {
parent::setUp();
$this->steamId = $this->getSteamId('76561198024494988', 'Icewind');