Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-04-13 05:56:01 +0300
committerMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-04-13 05:56:01 +0300
commit6f2f77c35bee3fad35aab3412743d0289e05192c (patch)
tree5a8ef655dfba645021311c9d4a7bb0954d18aaa7 /test
parente83f739218d8ecd9200093f5c8a70bb9013de94c (diff)
Upgrade PHPUnit to 6.5
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/classes/ConfigTest.php6
-rw-r--r--test/classes/Di/ContainerTest.php3
-rw-r--r--test/classes/ErrorTest.php2
-rw-r--r--test/classes/Navigation/NodeFactoryTest.php6
-rw-r--r--test/classes/TemplateTest.php3
-rw-r--r--test/classes/TrackerTest.php2
6 files changed, 12 insertions, 10 deletions
diff --git a/test/classes/ConfigTest.php b/test/classes/ConfigTest.php
index 557a28b9fc..02d134a1bb 100644
--- a/test/classes/ConfigTest.php
+++ b/test/classes/ConfigTest.php
@@ -10,8 +10,8 @@ namespace PhpMyAdmin\Tests;
use PhpMyAdmin\Config;
use PhpMyAdmin\Tests\PmaTestCase;
-use PhpMyAdmin\Theme;
-use PHPUnit_Framework_Assert as Assert;
+use PHPUnit\Framework\Assert;
+use PHPUnit\Framework\Exception;
/**
* Tests behaviour of PhpMyAdmin\Config class
@@ -923,7 +923,7 @@ class ConfigTest extends PmaTestCase
public function testCheckServers($settings, $expected, $error = false)
{
if ($error) {
- $this->setExpectedException('PHPUnit_Framework_Error');
+ $this->expectException(Exception::class);
}
$this->object->settings['Servers'] = $settings;
diff --git a/test/classes/Di/ContainerTest.php b/test/classes/Di/ContainerTest.php
index 51a58e92bc..4500ffc3bf 100644
--- a/test/classes/Di/ContainerTest.php
+++ b/test/classes/Di/ContainerTest.php
@@ -9,6 +9,7 @@ namespace PhpMyAdmin\Tests\Di;
use PhpMyAdmin\Di\Container;
use PhpMyAdmin\Tests\PmaTestCase;
+use Psr\Container\NotFoundExceptionInterface;
/**
* Tests for PhpMyAdmin\Di\Container class
@@ -64,7 +65,7 @@ class ContainerTest extends PmaTestCase
*/
public function testGetThrowsNotFoundException()
{
- $this->setExpectedException('Psr\Container\NotFoundExceptionInterface');
+ $this->expectException(NotFoundExceptionInterface::class);
$this->container->get('name');
}
diff --git a/test/classes/ErrorTest.php b/test/classes/ErrorTest.php
index e29b261b3e..ee588eed12 100644
--- a/test/classes/ErrorTest.php
+++ b/test/classes/ErrorTest.php
@@ -119,7 +119,7 @@ class ErrorTest extends PmaTestCase
public function testGetBacktraceDisplay()
{
$this->assertContains(
- 'PHPUnit_Framework_TestResult->run(<Class:PhpMyAdmin\Tests\ErrorTest>)<br />',
+ 'PHPUnit\Framework\TestResult->run(<Class:PhpMyAdmin\Tests\ErrorTest>)<br />',
$this->object->getBacktraceDisplay()
);
}
diff --git a/test/classes/Navigation/NodeFactoryTest.php b/test/classes/Navigation/NodeFactoryTest.php
index 6632f318fb..5129ea00b8 100644
--- a/test/classes/Navigation/NodeFactoryTest.php
+++ b/test/classes/Navigation/NodeFactoryTest.php
@@ -10,7 +10,7 @@ namespace PhpMyAdmin\Tests\Navigation;
use PhpMyAdmin\Navigation\NodeFactory;
use PhpMyAdmin\Navigation\Nodes\Node;
use PhpMyAdmin\Tests\PmaTestCase;
-use PhpMyAdmin\Theme;
+use PHPUnit\Framework\Exception;
/**
* Tests for NodeFactory class
@@ -84,7 +84,7 @@ class NodeFactoryTest extends PmaTestCase
*/
public function testFileError()
{
- $this->setExpectedException('PHPUnit_Framework_Error');
+ $this->expectException(Exception::class);
NodeFactory::getInstance('NodeDoesNotExist');
}
@@ -95,7 +95,7 @@ class NodeFactoryTest extends PmaTestCase
*/
public function testClassNameError()
{
- $this->setExpectedException('PHPUnit_Framework_Error');
+ $this->expectException(Exception::class);
NodeFactory::getInstance('Invalid');
}
}
diff --git a/test/classes/TemplateTest.php b/test/classes/TemplateTest.php
index 2e3926a786..9fa13ee216 100644
--- a/test/classes/TemplateTest.php
+++ b/test/classes/TemplateTest.php
@@ -9,6 +9,7 @@ namespace PhpMyAdmin\Tests;
use PhpMyAdmin\Template;
use PhpMyAdmin\Tests\PmaTestCase;
+use Twig\Error\LoaderError;
/**
* Test for PhpMyAdmin\Template class
@@ -89,7 +90,7 @@ class TemplateTest extends PmaTestCase
*/
public function testRenderTemplateNotFound()
{
- $this->setExpectedException('Twig\Error\LoaderError');
+ $this->expectException(LoaderError::class);
Template::get('template not found')->render();
}
diff --git a/test/classes/TrackerTest.php b/test/classes/TrackerTest.php
index a658f19557..c94c848231 100644
--- a/test/classes/TrackerTest.php
+++ b/test/classes/TrackerTest.php
@@ -11,7 +11,7 @@ use PhpMyAdmin\DatabaseInterface;
use PhpMyAdmin\Tests\PmaTestCase;
use PhpMyAdmin\Tracker;
use PhpMyAdmin\Util;
-use PHPUnit_Framework_Assert as Assert;
+use PHPUnit\Framework\Assert;
use ReflectionClass;
/**