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:
authordiosmosis <diosmosis@users.noreply.github.com>2019-01-07 03:52:42 +0300
committerGitHub <noreply@github.com>2019-01-07 03:52:42 +0300
commit4fc054b0219d4c1c35c47616536488d6ff10d0dd (patch)
tree8c27cb0ebb16adcf27803a8be9c285fbbfb31f1f /plugins/CoreUpdater
parentd16f5b2de775cabcac62b518b1fa5f5908c5fd36 (diff)
Update submodules. (#13936)
* Update submodules. * Update expected files. * Fix more integration tests. * Update submodule. * Update screenshots.
Diffstat (limited to 'plugins/CoreUpdater')
-rw-r--r--plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php40
1 files changed, 24 insertions, 16 deletions
diff --git a/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php b/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php
index 935170df46..4ca96d1c58 100644
--- a/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php
+++ b/plugins/CoreUpdater/tests/Integration/UpdateCommunicationTest.php
@@ -15,6 +15,7 @@ use Piwik\Tests\Framework\Fixture;
use Piwik\UpdateCheck;
use Piwik\Version;
use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
+use Piwik\View;
/**
* @group Plugins
@@ -69,20 +70,23 @@ class UpdateCommunicationTest extends IntegrationTestCase
public function test_sendNotifications_shouldSentCorrectEmail()
{
$rootUrl = Fixture::getTestRootUrl();
- $message = "ScheduledReports_EmailHello
+ $message = "<p>ScheduledReports_EmailHello</p>
-CoreUpdater_ThereIsNewVersionAvailableForUpdate
+<p>CoreUpdater_ThereIsNewVersionAvailableForUpdate</p>
-CoreUpdater_YouCanUpgradeAutomaticallyOrDownloadPackage
+<p>CoreUpdater_YouCanUpgradeAutomaticallyOrDownloadPackage<br/>
{$rootUrl}index.php?module=CoreUpdater&action=newVersionAvailable
+</p>
-CoreUpdater_ViewVersionChangelog
-https://matomo.org/changelog/matomo-33-0-0/
+<p>
+ CoreUpdater_ViewVersionChangelog
+ <br/>
+ https://matomo.org/changelog/matomo-33-0-0/
+</p>
-CoreUpdater_ReceiveEmailBecauseIsSuperUser
-
-CoreUpdater_FeedbackRequest
-https://matomo.org/contact/";
+<p>CoreUpdater_ReceiveEmailBecauseIsSuperUser</p>
+<p>CoreUpdater_FeedbackRequest<br/>https://matomo.org/contact/</p>
+";
$this->assertEmailForVersion('33.0.0', $message);
}
@@ -90,17 +94,18 @@ https://matomo.org/contact/";
public function test_sendNotifications_shouldNotIncludeChangelogIfNotMajorVersionUpdate()
{
$rootUrl = Fixture::getTestRootUrl();
- $message = "ScheduledReports_EmailHello
+ $message = "<p>ScheduledReports_EmailHello</p>
-CoreUpdater_ThereIsNewVersionAvailableForUpdate
+<p>CoreUpdater_ThereIsNewVersionAvailableForUpdate</p>
-CoreUpdater_YouCanUpgradeAutomaticallyOrDownloadPackage
+<p>CoreUpdater_YouCanUpgradeAutomaticallyOrDownloadPackage<br/>
{$rootUrl}index.php?module=CoreUpdater&action=newVersionAvailable
+</p>
-CoreUpdater_ReceiveEmailBecauseIsSuperUser
-CoreUpdater_FeedbackRequest
-https://matomo.org/contact/";
+<p>CoreUpdater_ReceiveEmailBecauseIsSuperUser</p>
+<p>CoreUpdater_FeedbackRequest<br/>https://matomo.org/contact/</p>
+";
$this->assertEmailForVersion('33.0.0-b1', $message);
}
@@ -114,7 +119,10 @@ https://matomo.org/contact/";
$mock = $this->getCommunicationMock(array('sendEmailNotification'));
$mock->expects($this->once())
->method('sendEmailNotification')
- ->with($this->equalTo($subject), $this->equalTo($expectedMessage));
+ ->with($this->equalTo($subject), $this->callback(function (View $view) use ($expectedMessage) {
+ $this->assertEquals($expectedMessage, $view->render());
+ return true;
+ }));
$mock->sendNotificationIfUpdateAvailable();
}