Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374562 )

Change subject: Merge branch 'master' into deployment
......................................................................

Merge branch 'master' into deployment

cee22c762 Add test for Templating
e9a491572 Cache result of template loads, including language fallback lookups

Change-Id: Ib3ceb63f2573c4e862cd99e73834e960d375cd4a
---
D sites/all/modules/wmf_communication/tests/phpunit/TemplatingTest.php
D sites/all/modules/wmf_communication/tests/templates/html/thank_you.it.html
2 files changed, 0 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/62/374562/1

diff --git 
a/sites/all/modules/wmf_communication/tests/phpunit/TemplatingTest.php 
b/sites/all/modules/wmf_communication/tests/phpunit/TemplatingTest.php
deleted file mode 100644
index 8457858..0000000
--- a/sites/all/modules/wmf_communication/tests/phpunit/TemplatingTest.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace wmf_communication;
-
-use \BaseWmfDrupalPhpUnitTestCase;
-
-/**
- * @group WmfCommunication
- */
-class TemplatingTest extends BaseWmfDrupalPhpUnitTestCase {
-
-       protected function getParams() {
-               return array(
-                       'locale' => 'it',
-                       'name' => 'Test Donor',
-                       'receive_date' => 'Smarch 13th',
-                       'currency' => 'EUR',
-                       'amount' => 55.22
-               );
-       }
-
-       protected static $expected = "<p>Caro Test Donor,</p>
-
-<p>Grazie per la tua donazione alla Wikimedia Foundation. È stata davvero 
apprezzata di
-cuore!</p>
-
-<p>Per le tue registrazioni: La tua donazione il Smarch 13th è stata
-€ 55,22.</p>
-";
-
-       public function testRender() {
-               $params = $this->getParams();
-               $template = new Templating(
-                       __DIR__ . DIRECTORY_SEPARATOR . '../templates',
-                       'thank_you',
-                       $params['locale'],
-                       $params
-               );
-
-               $rendered = $template->render( 'html' );
-               $this->assertEquals( self::$expected, $rendered );
-       }
-
-       public function testRenderWithFallback() {
-               $params = $this->getParams();
-               $params['locale'] = 'it_FR';
-               $template = new Templating(
-                       __DIR__ . DIRECTORY_SEPARATOR . '../templates',
-                       'thank_you',
-                       $params['locale'],
-                       $params
-               );
-
-               $rendered = $template->render( 'html' );
-               $this->assertEquals( self::$expected, $rendered );
-       }
-}
diff --git 
a/sites/all/modules/wmf_communication/tests/templates/html/thank_you.it.html 
b/sites/all/modules/wmf_communication/tests/templates/html/thank_you.it.html
deleted file mode 100644
index 3de5bd7..0000000
--- a/sites/all/modules/wmf_communication/tests/templates/html/thank_you.it.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<<<<<<< HEAD   (7dfea0 Merge branch 'master' into deployment)
-=======
-<p>Caro {{name}},</p>
-
-<p>Grazie per la tua donazione alla Wikimedia Foundation. È stata davvero 
apprezzata di
-cuore!</p>
-
-<p>Per le tue registrazioni: La tua donazione il {{receive_date}} è stata
-{{ (currency ~ " " ~ amount) | l10n_currency(locale) }}.</p>
->>>>>>> BRANCH (e9a491 Cache result of template loads, including language 
fallback )

-- 
To view, visit https://gerrit.wikimedia.org/r/374562
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3ceb63f2573c4e862cd99e73834e960d375cd4a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg <ej...@ejegg.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to