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/Tour
parentf28c7fa6cb6c63c8f459206448c7dcb93568099e (diff)
Update to PHPUnit 8.5 (#15581)
* use latest phpunit/phpunit ~8.5 * submodule updates * fixes
Diffstat (limited to 'plugins/Tour')
-rw-r--r--plugins/Tour/tests/Fixtures/SimpleFixtureTrackFewVisits.php4
-rw-r--r--plugins/Tour/tests/Integration/ChallengeTest.php4
-rw-r--r--plugins/Tour/tests/System/APITest.php14
-rw-r--r--plugins/Tour/tests/System/DataFinderTest.php2
-rw-r--r--plugins/Tour/tests/System/TourTest.php2
5 files changed, 12 insertions, 14 deletions
diff --git a/plugins/Tour/tests/Fixtures/SimpleFixtureTrackFewVisits.php b/plugins/Tour/tests/Fixtures/SimpleFixtureTrackFewVisits.php
index 7bbdf8cb4c..196d307263 100644
--- a/plugins/Tour/tests/Fixtures/SimpleFixtureTrackFewVisits.php
+++ b/plugins/Tour/tests/Fixtures/SimpleFixtureTrackFewVisits.php
@@ -21,13 +21,13 @@ class SimpleFixtureTrackFewVisits extends Fixture
public $dateTime = '2013-01-23 01:23:45';
public $idSite = 1;
- public function setUp()
+ public function setUp(): void
{
$this->setUpWebsite();
$this->trackFirstVisit();
}
- public function tearDown()
+ public function tearDown(): void
{
// empty
}
diff --git a/plugins/Tour/tests/Integration/ChallengeTest.php b/plugins/Tour/tests/Integration/ChallengeTest.php
index 58d49dbd0d..0b57ca62bb 100644
--- a/plugins/Tour/tests/Integration/ChallengeTest.php
+++ b/plugins/Tour/tests/Integration/ChallengeTest.php
@@ -50,7 +50,7 @@ class ChallengeTest extends IntegrationTestCase
*/
private $challenge2;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
@@ -58,7 +58,7 @@ class ChallengeTest extends IntegrationTestCase
$this->challenge2 = new CustomTest2Challenge();
}
- public function tearDown()
+ public function tearDown(): void
{
Challenge::clearCache();
parent::tearDown();
diff --git a/plugins/Tour/tests/System/APITest.php b/plugins/Tour/tests/System/APITest.php
index 0287f417b3..c790eb62d2 100644
--- a/plugins/Tour/tests/System/APITest.php
+++ b/plugins/Tour/tests/System/APITest.php
@@ -61,21 +61,19 @@ class APITest extends SystemTestCase
$this->assertTrue($steps[1]['isSkipped']);
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Challenge already completed
- */
public function test_skipStep_alreadyCompleted()
{
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('Challenge already completed');
+
Request::processRequest('Tour.skipChallenge', array('id' => 'track_data'));
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Challenge not found
- */
public function test_skipStep_invalid()
{
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('Challenge not found');
+
Request::processRequest('Tour.skipChallenge', array('id' => 'foobarbaz'));
}
diff --git a/plugins/Tour/tests/System/DataFinderTest.php b/plugins/Tour/tests/System/DataFinderTest.php
index 4345ada15f..48374e60c6 100644
--- a/plugins/Tour/tests/System/DataFinderTest.php
+++ b/plugins/Tour/tests/System/DataFinderTest.php
@@ -32,7 +32,7 @@ class DataFinderTest extends SystemTestCase
*/
private $dataFinder;
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
$this->dataFinder = new DataFinder();
diff --git a/plugins/Tour/tests/System/TourTest.php b/plugins/Tour/tests/System/TourTest.php
index 4163192670..d09fd0c5a1 100644
--- a/plugins/Tour/tests/System/TourTest.php
+++ b/plugins/Tour/tests/System/TourTest.php
@@ -29,7 +29,7 @@ class TourTest extends SystemTestCase
*/
public static $fixture = null; // initialized below class definition
- public function setUp()
+ public function setUp(): void
{
parent::setUp();
}