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

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-02-27 13:08:45 +0300
committerGitHub <noreply@github.com>2020-02-27 13:08:45 +0300
commit93aef4865cfdee9fcfa5acc9ff1950459a0af42e (patch)
treeaa8ad643d8ad233ffb2b033a437bcd2b71274877 /plugins/CoreUpdater
parentf28c7fa6cb6c63c8f459206448c7dcb93568099e (diff)
Update to PHPUnit 8.5 (#15581)
* use latest phpunit/phpunit ~8.5 * submodule updates * fixes
Diffstat (limited to 'plugins/CoreUpdater')
-rw-r--r--plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php12
-rw-r--r--plugins/CoreUpdater/tests/Integration/ReleaseChannelTest.php2
-rw-r--r--plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php2
-rw-r--r--plugins/CoreUpdater/tests/Unit/ModelTest.php18
4 files changed, 17 insertions, 17 deletions
diff --git a/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php b/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php
index 08cba25cb4..4a2b5faa02 100644
--- a/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php
+++ b/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php
@@ -30,7 +30,7 @@ class UpdateTest extends ConsoleCommandTestCase
private $oldScriptName = null;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
@@ -44,7 +44,7 @@ class UpdateTest extends ConsoleCommandTestCase
Updates_2_10_0_b5::$archiveBlobTables = null;
}
- public function tearDown()
+ public function tearDown(): void
{
$_SERVER['SCRIPT_NAME'] = $this->oldScriptName;
@@ -96,7 +96,7 @@ class UpdateTest extends ConsoleCommandTestCase
$this->assertEquals(0, $result, $this->getCommandDisplayOutputErrorMessage());
// check no update occurred
- $this->assertContains("Everything is already up to date.", $this->applicationTester->getDisplay());
+ self::assertStringContainsString("Everything is already up to date.", $this->applicationTester->getDisplay());
$this->assertEquals(Version::VERSION, Option::get('version_core'));
}
@@ -112,12 +112,12 @@ class UpdateTest extends ConsoleCommandTestCase
));
$this->assertEquals(1, $result, $this->getCommandDisplayOutputErrorMessage());
- $this->assertContains("Matomo could not be updated! See above for more information.", $this->applicationTester->getDisplay());
+ self::assertStringContainsString("Matomo could not be updated! See above for more information.", $this->applicationTester->getDisplay());
}
private function assertDryRunExecuted($output)
{
- $this->assertContains("Note: this is a Dry Run", $output);
- $this->assertContains(self::EXPECTED_SQL_FROM_2_10, $output);
+ self::assertStringContainsString("Note: this is a Dry Run", $output);
+ self::assertStringContainsString(self::EXPECTED_SQL_FROM_2_10, $output);
}
}
diff --git a/plugins/CoreUpdater/tests/Integration/ReleaseChannelTest.php b/plugins/CoreUpdater/tests/Integration/ReleaseChannelTest.php
index 4e89187926..b133831099 100644
--- a/plugins/CoreUpdater/tests/Integration/ReleaseChannelTest.php
+++ b/plugins/CoreUpdater/tests/Integration/ReleaseChannelTest.php
@@ -41,7 +41,7 @@ class ReleaseChannelTest extends IntegrationTestCase
*/
private $channel;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
diff --git a/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php b/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php
index 2e2b883982..a65473414f 100644
--- a/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php
+++ b/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php
@@ -22,7 +22,7 @@ use Piwik\View;
*/
class UpdateCommunicationTest extends IntegrationTestCase
{
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
}
diff --git a/plugins/CoreUpdater/tests/Unit/ModelTest.php b/plugins/CoreUpdater/tests/Unit/ModelTest.php
index 147db69155..d14beb7399 100644
--- a/plugins/CoreUpdater/tests/Unit/ModelTest.php
+++ b/plugins/CoreUpdater/tests/Unit/ModelTest.php
@@ -23,7 +23,7 @@ class ModelTest extends \PHPUnit\Framework\TestCase
*/
private $model;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
@@ -42,14 +42,14 @@ class ModelTest extends \PHPUnit\Framework\TestCase
$plugins = $this->model->getPluginsFromDirectoy(PIWIK_INCLUDE_PATH);
$this->assertGreaterThan(40, count($plugins));
- $this->assertContains('/plugins/API', $plugins);
- $this->assertContains('/plugins/Actions', $plugins);
- $this->assertContains('/plugins/Annotations', $plugins);
-
- $this->assertNotContains('/plugins/.', $plugins);
- $this->assertNotContains('/plugins/..', $plugins);
- $this->assertNotContains('/plugins', $plugins);
- $this->assertNotContains('/plugins/', $plugins);
+ self::assertTrue(in_array('/plugins/API', $plugins));
+ self::assertTrue(in_array('/plugins/Actions', $plugins));
+ self::assertTrue(in_array('/plugins/Annotations', $plugins));
+
+ self::assertTrue(!in_array('/plugins/.', $plugins));
+ self::assertTrue(!in_array('/plugins/..', $plugins));
+ self::assertTrue(!in_array('/plugins', $plugins));
+ self::assertTrue(!in_array('/plugins/', $plugins));
foreach ($plugins as $plugin) {
$this->assertTrue(is_dir(PIWIK_INCLUDE_PATH . $plugin));