updating tests by dropping PHPunit 4.6 support

This commit is contained in:
El RIDO 2020-10-10 12:08:58 +02:00
parent 99f50f6de3
commit 6f90df9545
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
19 changed files with 35 additions and 18 deletions

View File

@ -29,7 +29,7 @@
"yzalis/identicon" : "^2.0.0" "yzalis/identicon" : "^2.0.0"
}, },
"require-dev" : { "require-dev" : {
"phpunit/phpunit" : "^4.6 || ^5 || ^9" "phpunit/phpunit" : "^5 || ^9"
}, },
"autoload" : { "autoload" : {
"psr-4" : { "psr-4" : {

2
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "a0e6ddfb640e9d613dfb4bddd578cc94", "content-hash": "c5e5c4d3d99ae93c94cc75e225aa50f5",
"packages": [ "packages": [
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Configuration; use PrivateBin\Configuration;
class ConfigurationTest extends PHPUnit_Framework_TestCase class ConfigurationTest extends TestCase
{ {
private $_minimalConfig; private $_minimalConfig;

View File

@ -408,13 +408,14 @@ class ConfigurationTestGenerator
* DO NOT EDIT: This file is generated automatically using configGenerator.php * DO NOT EDIT: This file is generated automatically using configGenerator.php
*/ */
use PHPUnit\Framework\TestCase;
use PrivateBin\Controller; use PrivateBin\Controller;
use PrivateBin\Data\Filesystem; use PrivateBin\Data\Filesystem;
use PrivateBin\Persistence\ServerSalt; use PrivateBin\Persistence\ServerSalt;
use PrivateBin\Persistence\TrafficLimiter; use PrivateBin\Persistence\TrafficLimiter;
use PrivateBin\Request; use PrivateBin\Request;
class ConfigurationCombinationsTest extends PHPUnit_Framework_TestCase class ConfigurationCombinationsTest extends TestCase
{ {
private $_conf; private $_conf;

View File

@ -1,12 +1,13 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Controller; use PrivateBin\Controller;
use PrivateBin\Data\Filesystem; use PrivateBin\Data\Filesystem;
use PrivateBin\Persistence\ServerSalt; use PrivateBin\Persistence\ServerSalt;
use PrivateBin\Persistence\TrafficLimiter; use PrivateBin\Persistence\TrafficLimiter;
use PrivateBin\Request; use PrivateBin\Request;
class ControllerTest extends PHPUnit_Framework_TestCase class ControllerTest extends TestCase
{ {
protected $_data; protected $_data;

View File

@ -1,5 +1,6 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Data\Database; use PrivateBin\Data\Database;
require_once 'ControllerTest.php'; require_once 'ControllerTest.php';

View File

@ -1,9 +1,10 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Controller; use PrivateBin\Controller;
use PrivateBin\Data\Database; use PrivateBin\Data\Database;
class DatabaseTest extends PHPUnit_Framework_TestCase class DatabaseTest extends TestCase
{ {
private $_model; private $_model;

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Data\Filesystem; use PrivateBin\Data\Filesystem;
class FilesystemTest extends PHPUnit_Framework_TestCase class FilesystemTest extends TestCase
{ {
private $_model; private $_model;

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Filter; use PrivateBin\Filter;
class FilterTest extends PHPUnit_Framework_TestCase class FilterTest extends TestCase
{ {
public function testFilterMakesTimesHumanlyReadable() public function testFilterMakesTimesHumanlyReadable()
{ {

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\FormatV2; use PrivateBin\FormatV2;
class FormatV2Test extends PHPUnit_Framework_TestCase class FormatV2Test extends TestCase
{ {
public function testFormatV2ValidatorValidatesCorrectly() public function testFormatV2ValidatorValidatesCorrectly()
{ {

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\I18n; use PrivateBin\I18n;
class I18nTest extends PHPUnit_Framework_TestCase class I18nTest extends TestCase
{ {
private $_translations = array(); private $_translations = array();

View File

@ -1,11 +1,12 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Controller; use PrivateBin\Controller;
use PrivateBin\Data\Filesystem; use PrivateBin\Data\Filesystem;
use PrivateBin\Persistence\ServerSalt; use PrivateBin\Persistence\ServerSalt;
use PrivateBin\Request; use PrivateBin\Request;
class JsonApiTest extends PHPUnit_Framework_TestCase class JsonApiTest extends TestCase
{ {
protected $_model; protected $_model;

View File

@ -1,6 +1,7 @@
<?php <?php
use Identicon\Identicon; use Identicon\Identicon;
use PHPUnit\Framework\TestCase;
use PrivateBin\Configuration; use PrivateBin\Configuration;
use PrivateBin\Data\Database; use PrivateBin\Data\Database;
use PrivateBin\Model; use PrivateBin\Model;
@ -10,7 +11,7 @@ use PrivateBin\Persistence\ServerSalt;
use PrivateBin\Persistence\TrafficLimiter; use PrivateBin\Persistence\TrafficLimiter;
use PrivateBin\Vizhash16x16; use PrivateBin\Vizhash16x16;
class ModelTest extends PHPUnit_Framework_TestCase class ModelTest extends TestCase
{ {
private $_conf; private $_conf;

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Persistence\PurgeLimiter; use PrivateBin\Persistence\PurgeLimiter;
class PurgeLimiterTest extends PHPUnit_Framework_TestCase class PurgeLimiterTest extends TestCase
{ {
private $_path; private $_path;

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Persistence\ServerSalt; use PrivateBin\Persistence\ServerSalt;
class ServerSaltTest extends PHPUnit_Framework_TestCase class ServerSaltTest extends TestCase
{ {
private $_path; private $_path;

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Persistence\TrafficLimiter; use PrivateBin\Persistence\TrafficLimiter;
class TrafficLimiterTest extends PHPUnit_Framework_TestCase class TrafficLimiterTest extends TestCase
{ {
private $_path; private $_path;

View File

@ -1,8 +1,9 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Request; use PrivateBin\Request;
class RequestTest extends PHPUnit_Framework_TestCase class RequestTest extends TestCase
{ {
public function setUp() public function setUp()
{ {

View File

@ -1,9 +1,10 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\I18n; use PrivateBin\I18n;
use PrivateBin\View; use PrivateBin\View;
class ViewTest extends PHPUnit_Framework_TestCase class ViewTest extends TestCase
{ {
private static $error = 'foo bar'; private static $error = 'foo bar';

View File

@ -1,9 +1,10 @@
<?php <?php
use PHPUnit\Framework\TestCase;
use PrivateBin\Persistence\ServerSalt; use PrivateBin\Persistence\ServerSalt;
use PrivateBin\Vizhash16x16; use PrivateBin\Vizhash16x16;
class Vizhash16x16Test extends PHPUnit_Framework_TestCase class Vizhash16x16Test extends TestCase
{ {
private $_file; private $_file;