Skip to content

Commit

Permalink
Use AbstractTestCase on all unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed May 20, 2020
1 parent 8624fbb commit 8ef5143
Show file tree
Hide file tree
Showing 78 changed files with 155 additions and 156 deletions.
4 changes: 2 additions & 2 deletions test/classes/BookmarkTest.php
Expand Up @@ -7,12 +7,12 @@
namespace PhpMyAdmin\Tests;

use PhpMyAdmin\Bookmark;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* Tests for Bookmark class
*/
class BookmarkTest extends TestCase
class BookmarkTest extends AbstractTestCase
{
/**
* Sets up the fixture, for example, opens a network connection.
Expand Down
4 changes: 2 additions & 2 deletions test/classes/BrowseForeignersTest.php
Expand Up @@ -8,13 +8,13 @@

use PhpMyAdmin\BrowseForeigners;
use PhpMyAdmin\Template;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;
use ReflectionClass;

/**
* Tests for PhpMyAdmin\BrowseForeigners
*/
class BrowseForeignersTest extends TestCase
class BrowseForeignersTest extends AbstractTestCase
{
private $browseForeigners;

Expand Down
4 changes: 2 additions & 2 deletions test/classes/CentralColumnsTest.php
Expand Up @@ -14,15 +14,15 @@
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;
use PhpMyAdmin\Message;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;
use ReflectionClass;
use function array_slice;
use function ceil;

/**
* tests for PhpMyAdmin\CentralColumns
*/
class CentralColumnsTest extends TestCase
class CentralColumnsTest extends AbstractTestCase
{
private $centralColumns;

Expand Down
4 changes: 2 additions & 2 deletions test/classes/Charsets/CharsetTest.php
Expand Up @@ -4,9 +4,9 @@
namespace PhpMyAdmin\Tests\Charsets;

use PhpMyAdmin\Charsets\Charset;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class CharsetTest extends TestCase
class CharsetTest extends AbstractTestCase
{
public function testFromServer(): void
{
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Charsets/CollationTest.php
Expand Up @@ -4,9 +4,9 @@
namespace PhpMyAdmin\Tests\Charsets;

use PhpMyAdmin\Charsets\Collation;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class CollationTest extends TestCase
class CollationTest extends AbstractTestCase
{
public function testFromServer(): void
{
Expand Down
4 changes: 2 additions & 2 deletions test/classes/CharsetsTest.php
Expand Up @@ -7,12 +7,12 @@
namespace PhpMyAdmin\Tests;

use PhpMyAdmin\Charsets;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* Tests for MySQL Charsets
*/
class CharsetsTest extends TestCase
class CharsetsTest extends AbstractTestCase
{
protected function setUp(): void
{
Expand Down
4 changes: 2 additions & 2 deletions test/classes/CheckUserPrivilegesTest.php
Expand Up @@ -7,12 +7,12 @@
namespace PhpMyAdmin\Tests;

use PhpMyAdmin\CheckUserPrivileges;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* tests for PhpMyAdmin\CheckUserPrivileges
*/
class CheckUserPrivilegesTest extends TestCase
class CheckUserPrivilegesTest extends AbstractTestCase
{
/** @var CheckUserPrivileges */
private $checkUserPrivileges;
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Config/FormDisplayTemplateTest.php
Expand Up @@ -8,12 +8,12 @@

use PhpMyAdmin\Config;
use PhpMyAdmin\Config\FormDisplayTemplate;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* Tests for FormDisplayTemplate
*/
class FormDisplayTemplateTest extends TestCase
class FormDisplayTemplateTest extends AbstractTestCase
{
/** @var FormDisplayTemplate */
protected $formDisplayTemplate;
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Controllers/Server/BinlogControllerTest.php
Expand Up @@ -13,12 +13,12 @@
use PhpMyAdmin\Tests\Stubs\Response;
use PhpMyAdmin\Url;
use PhpMyAdmin\Util;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* Tests for BinlogController class
*/
class BinlogControllerTest extends TestCase
class BinlogControllerTest extends AbstractTestCase
{
/**
* Prepares environment for the test.
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Controllers/Server/CollationsControllerTest.php
Expand Up @@ -10,12 +10,12 @@
use PhpMyAdmin\Controllers\Server\CollationsController;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* Tests for CollationsController class
*/
class CollationsControllerTest extends TestCase
class CollationsControllerTest extends AbstractTestCase
{
/**
* Prepares environment for the test.
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Controllers/Server/DatabasesControllerTest.php
Expand Up @@ -14,14 +14,14 @@
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PhpMyAdmin\Transformations;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;
use stdClass;
use function sprintf;

/**
* Tests for DatabasesController class
*/
class DatabasesControllerTest extends TestCase
class DatabasesControllerTest extends AbstractTestCase
{
protected function setUp(): void
{
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Controllers/Server/EnginesControllerTest.php
Expand Up @@ -11,14 +11,14 @@
use PhpMyAdmin\Html\MySQLDocumentation;
use PhpMyAdmin\StorageEngine;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\AbstractTestCase;
use PhpMyAdmin\Tests\Stubs\Response;
use PHPStan\Testing\TestCase;
use function htmlspecialchars;

/**
* Tests for EnginesController class
*/
class EnginesControllerTest extends TestCase
class EnginesControllerTest extends AbstractTestCase
{
/**
* Prepares environment for the test.
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Controllers/Server/PluginsControllerTest.php
Expand Up @@ -12,12 +12,12 @@
use PhpMyAdmin\Server\Plugins;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* Tests for PluginsController class
*/
class PluginsControllerTest extends TestCase
class PluginsControllerTest extends AbstractTestCase
{
/**
* Prepares environment for the test.
Expand Down
Expand Up @@ -11,10 +11,10 @@
use PhpMyAdmin\Server\Status\Data;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;

class AdvisorControllerTest extends TestCase
class AdvisorControllerTest extends AbstractTestCase
{
/** @var Response */
private $response;
Expand Down
Expand Up @@ -13,9 +13,9 @@
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PhpMyAdmin\Util;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class MonitorControllerTest extends TestCase
class MonitorControllerTest extends AbstractTestCase
{
/** @var Data */
private $data;
Expand Down
Expand Up @@ -13,10 +13,10 @@
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PhpMyAdmin\Url;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;
use function htmlspecialchars;

class ProcessesControllerTest extends TestCase
class ProcessesControllerTest extends AbstractTestCase
{
/** @var Data */
private $data;
Expand Down
Expand Up @@ -13,11 +13,11 @@
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PhpMyAdmin\Util;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;
use function array_sum;
use function htmlspecialchars;

class QueriesControllerTest extends TestCase
class QueriesControllerTest extends AbstractTestCase
{
/** @var Data */
private $data;
Expand Down
Expand Up @@ -14,9 +14,9 @@
use PhpMyAdmin\Server\Status\Data;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class StatusControllerTest extends TestCase
class StatusControllerTest extends AbstractTestCase
{
protected function setUp(): void
{
Expand Down
Expand Up @@ -12,9 +12,9 @@
use PhpMyAdmin\Server\Status\Data;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class VariablesControllerTest extends TestCase
class VariablesControllerTest extends AbstractTestCase
{
/** @var Data */
private $data;
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Controllers/Server/VariablesControllerTest.php
Expand Up @@ -13,7 +13,7 @@
use PhpMyAdmin\Response;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response as ResponseStub;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;
use ReflectionClass;
use Williamdes\MariaDBMySQLKBS\Search as KBSearch;
use Williamdes\MariaDBMySQLKBS\SlimData as KBSlimData;
Expand All @@ -23,7 +23,7 @@
/**
* Tests for VariablesController class
*/
class VariablesControllerTest extends TestCase
class VariablesControllerTest extends AbstractTestCase
{
protected function setUp(): void
{
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Controllers/Table/FindReplaceControllerTest.php
Expand Up @@ -9,9 +9,9 @@
use PhpMyAdmin\Response;
use PhpMyAdmin\Template;
use PhpMyAdmin\Types;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class FindReplaceControllerTest extends TestCase
class FindReplaceControllerTest extends AbstractTestCase
{
protected function setUp(): void
{
Expand Down
Expand Up @@ -11,12 +11,12 @@
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\Stubs\Response;
use PhpMyAdmin\Transformations;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* Tests for TransformationOverviewController class
*/
class TransformationOverviewControllerTest extends TestCase
class TransformationOverviewControllerTest extends AbstractTestCase
{
/**
* Prepares environment for the test.
Expand Down
4 changes: 2 additions & 2 deletions test/classes/CreateAddFieldTest.php
Expand Up @@ -7,12 +7,12 @@
namespace PhpMyAdmin\Tests;

use PhpMyAdmin\CreateAddField;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* This class is for testing PhpMyAdmin\CreateAddField methods
*/
class CreateAddFieldTest extends TestCase
class CreateAddFieldTest extends AbstractTestCase
{
/** @var CreateAddField */
private $createAddField;
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Database/Designer/CommonTest.php
Expand Up @@ -9,12 +9,12 @@
use PhpMyAdmin\Database\Designer\Common;
use PhpMyAdmin\DatabaseInterface;
use PhpMyAdmin\Relation;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

/**
* Tests for PhpMyAdmin\Database\Designer\Common
*/
class CommonTest extends TestCase
class CommonTest extends AbstractTestCase
{
/** @var Common */
private $designerCommon;
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Database/DesignerTest.php
Expand Up @@ -10,13 +10,13 @@
use PhpMyAdmin\DatabaseInterface;
use PhpMyAdmin\Relation;
use PhpMyAdmin\Template;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;
use ReflectionMethod;

/**
* Tests for PhpMyAdmin\Database\Designer
*/
class DesignerTest extends TestCase
class DesignerTest extends AbstractTestCase
{
/** @var Designer */
private $designer;
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Database/EventsTest.php
Expand Up @@ -9,9 +9,9 @@
use PhpMyAdmin\Database\Events;
use PhpMyAdmin\Response;
use PhpMyAdmin\Template;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class EventsTest extends TestCase
class EventsTest extends AbstractTestCase
{
/** @var Events */
private $events;
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Database/RoutinesTest.php
Expand Up @@ -10,9 +10,9 @@
use PhpMyAdmin\Response;
use PhpMyAdmin\Template;
use PhpMyAdmin\Types;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class RoutinesTest extends TestCase
class RoutinesTest extends AbstractTestCase
{
/** @var Routines */
private $routines;
Expand Down
4 changes: 2 additions & 2 deletions test/classes/Database/TriggersTest.php
Expand Up @@ -8,9 +8,9 @@
use PhpMyAdmin\Database\Triggers;
use PhpMyAdmin\Response;
use PhpMyAdmin\Template;
use PHPUnit\Framework\TestCase;
use PhpMyAdmin\Tests\AbstractTestCase;

class TriggersTest extends TestCase
class TriggersTest extends AbstractTestCase
{
/** @var Triggers */
private $triggers;
Expand Down

0 comments on commit 8ef5143

Please sign in to comment.