diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-02-27 13:08:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 13:08:45 +0300 |
commit | 93aef4865cfdee9fcfa5acc9ff1950459a0af42e (patch) | |
tree | aa8ad643d8ad233ffb2b033a437bcd2b71274877 /plugins/Feedback | |
parent | f28c7fa6cb6c63c8f459206448c7dcb93568099e (diff) |
Update to PHPUnit 8.5 (#15581)
* use latest phpunit/phpunit ~8.5
* submodule updates
* fixes
Diffstat (limited to 'plugins/Feedback')
-rw-r--r-- | plugins/Feedback/tests/Fixtures/FeedbackPopupFixture.php | 4 | ||||
-rw-r--r-- | plugins/Feedback/tests/Integration/ControllerTest.php | 8 | ||||
-rw-r--r-- | plugins/Feedback/tests/Integration/FeedbackTest.php | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/plugins/Feedback/tests/Fixtures/FeedbackPopupFixture.php b/plugins/Feedback/tests/Fixtures/FeedbackPopupFixture.php index e2ceaeb164..182582034c 100644 --- a/plugins/Feedback/tests/Fixtures/FeedbackPopupFixture.php +++ b/plugins/Feedback/tests/Fixtures/FeedbackPopupFixture.php @@ -9,14 +9,14 @@ use Piwik\Tests\Fixtures\UITestFixture; class FeedbackPopupFixture extends UITestFixture { - public function setUp() + public function setUp(): void { parent::setUp(); $yesterday = Date::yesterday(); Option::set('Feedback.nextFeedbackReminder.superUserLogin', $yesterday->toString('Y-m-d')); } - public function tearDown() + public function tearDown(): void { parent::tearDown(); Option::delete('Feedback.nextFeedbackReminder.superUserLogin'); diff --git a/plugins/Feedback/tests/Integration/ControllerTest.php b/plugins/Feedback/tests/Integration/ControllerTest.php index fa39b28bfd..acd95512e3 100644 --- a/plugins/Feedback/tests/Integration/ControllerTest.php +++ b/plugins/Feedback/tests/Integration/ControllerTest.php @@ -6,7 +6,7 @@ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -namespace Piwik\Plugins\Feedback\tests\Unit; +namespace Piwik\Plugins\Feedback\tests\Integration; use Piwik\Date; use Piwik\NoAccessException; @@ -26,7 +26,7 @@ class ControllerTest extends IntegrationTestCase private $now; - public function setUp() + public function setUp(): void { parent::setUp(); $this->controller = new Controller(); @@ -47,7 +47,7 @@ class ControllerTest extends IntegrationTestCase Date::$now = Date::factory('2019-05-31')->getTimestamp(); } - public function tearDown() + public function tearDown(): void { Option::deleteLike('Feedback.nextFeedbackReminder.%'); $this->userModel->deleteUserOnly('user1'); @@ -84,9 +84,9 @@ class ControllerTest extends IntegrationTestCase public function test_updateFeedbackReminder_notLoggedIn() { + $this->expectException(NoAccessException::class); FakeAccess::$identity = null; FakeAccess::$superUser = false; - $this->setExpectedException(NoAccessException::class); $this->controller->updateFeedbackReminderDate(); } }
\ No newline at end of file diff --git a/plugins/Feedback/tests/Integration/FeedbackTest.php b/plugins/Feedback/tests/Integration/FeedbackTest.php index 02031e31f0..072a12186b 100644 --- a/plugins/Feedback/tests/Integration/FeedbackTest.php +++ b/plugins/Feedback/tests/Integration/FeedbackTest.php @@ -26,11 +26,11 @@ class FeedbackTest extends IntegrationTestCase private $now; - public function setUp() + public function setUp(): void { parent::setUp(); - $this->feedback = $this->getMock(Feedback::class, ['isDisabledInTestMode']); + $this->feedback = $this->createPartialMock(Feedback::class, ['isDisabledInTestMode']); $this->feedback->method('isDisabledInTestMode')->willReturn(false); $this->userModel = new Model(); @@ -48,7 +48,7 @@ class FeedbackTest extends IntegrationTestCase $this->now = Date::$now; } - public function tearDown() + public function tearDown(): void { Option::deleteLike('Feedback.nextFeedbackReminder.%'); $this->userModel->deleteUserOnly('user1'); |