From 3e049c22c6375ea7be82c2d6d587950224b590af Mon Sep 17 00:00:00 2001
From: Erik Hansen <erik@classyllama.com>
Date: Thu, 9 Jul 2015 16:13:17 -0500
Subject: [PATCH] MAGETWO-37843: All responsive email templates in Blank Theme

- Fixes from code review
---
 .gitignore                                    | 50 +------------------
 app/code/Magento/Checkout/composer.json       |  1 +
 app/code/Magento/Config/etc/system.xsd        |  4 +-
 .../Magento/Customer/etc/adminhtml/system.xml |  4 +-
 app/code/Magento/ProductAlert/composer.json   |  1 +
 .../Magento/TestFramework/App/State.php       |  2 +-
 .../Magento/ProductAlert/Model/EmailTest.php  |  4 +-
 .../ProductAlert/Model/ObserverTest.php       |  4 +-
 .../Test/Legacy/_files/obsolete_classes.php   |  3 +-
 .../Test/Legacy/_files/obsolete_methods.php   |  7 ++-
 .../Legacy/_files/obsolete_namespaces.php     |  3 +-
 .../Filter/Test/Unit/TemplateTest.php         |  3 +-
 .../View/Asset/NotationResolver/Variable.php  |  5 +-
 .../Asset/PreProcessor/VariableNotation.php   |  7 ++-
 .../Asset/NotationResolver/VariableTest.php   |  2 +-
 15 files changed, 33 insertions(+), 67 deletions(-)
 mode change 100644 => 120000 .gitignore

diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 61d970a274b..00000000000
--- a/.gitignore
+++ /dev/null
@@ -1,49 +0,0 @@
-/.buildpath
-/.cache
-/.metadata
-/.project
-/.settings
-atlassian*
-/nbproject
-/sitemap
-/.idea
-/.gitattributes
-/app/config_sandbox
-/app/etc/config.php
-/app/etc/env.php
-/app/code/Magento/TestModule*
-/lib/internal/flex/uploader/.actionScriptProperties
-/lib/internal/flex/uploader/.flexProperties
-/lib/internal/flex/uploader/.project
-/lib/internal/flex/uploader/.settings
-/lib/internal/flex/varien/.actionScriptProperties
-/lib/internal/flex/varien/.flexLibProperties
-/lib/internal/flex/varien/.project
-/lib/internal/flex/varien/.settings
-/node_modules
-/.grunt
-
-/pub/media/*.*
-!/pub/media/.htaccess
-/pub/media/catalog/*
-!/pub/media/catalog/.htaccess
-/pub/media/customer/*
-!/pub/media/customer/.htaccess
-/pub/media/downloadable/*
-!/pub/media/downloadable/.htaccess
-/pub/media/import/*
-!/pub/media/import/.htaccess
-/pub/media/theme/*
-/pub/media/theme_customization/*
-!/pub/media/theme_customization/.htaccess
-/pub/media/wysiwyg/*
-!/pub/media/wysiwyg/.htaccess
-/pub/media/tmp/*
-!/pub/media/tmp/.htaccess
-/pub/media/captcha/*
-/pub/static/*
-!/pub/static/.htaccess
-
-/var/*
-!/var/.htaccess
-/vendor
diff --git a/.gitignore b/.gitignore
new file mode 120000
index 00000000000..c42dfc56a36
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.modman/magento2-responsive-email-test-data/.gitignore
\ No newline at end of file
diff --git a/app/code/Magento/Checkout/composer.json b/app/code/Magento/Checkout/composer.json
index 5103e4c82db..b1591e57678 100644
--- a/app/code/Magento/Checkout/composer.json
+++ b/app/code/Magento/Checkout/composer.json
@@ -5,6 +5,7 @@
         "php": "~5.5.0|~5.6.0",
         "magento/module-store": "0.74.0-beta16",
         "magento/module-sales": "0.74.0-beta16",
+        "magento/module-backend": "0.74.0-beta16",
         "magento/module-catalog-inventory": "0.74.0-beta16",
         "magento/module-config": "0.74.0-beta16",
         "magento/module-customer": "0.74.0-beta16",
diff --git a/app/code/Magento/Config/etc/system.xsd b/app/code/Magento/Config/etc/system.xsd
index 76968943337..7f3057d602c 100644
--- a/app/code/Magento/Config/etc/system.xsd
+++ b/app/code/Magento/Config/etc/system.xsd
@@ -422,7 +422,7 @@
     <xs:simpleType name="typeModule">
         <xs:annotation>
             <xs:documentation>
-                Item module attribute can has only [a-z0-9_\]. Minimal length 5 symbol. Case insensitive.
+                Item module attribute can have only [a-zA-Z0-9_\]. Minimal length 5 symbol. Case insensitive.
             </xs:documentation>
         </xs:annotation>
         <xs:restriction base="xs:string">
@@ -434,7 +434,7 @@
     <xs:simpleType name="typeModel">
         <xs:annotation>
             <xs:documentation>
-                Item model attribute can has only [a-zA-Z0-9_]. Minimal length 5 symbol. Case insensitive.
+                Item model attribute can have only [a-zA-Z0-9_]. Minimal length 5 symbol. Case insensitive.
             </xs:documentation>
         </xs:annotation>
         <xs:restriction base="xs:string">
diff --git a/app/code/Magento/Customer/etc/adminhtml/system.xml b/app/code/Magento/Customer/etc/adminhtml/system.xml
index ecf7889e877..df4a56940f5 100644
--- a/app/code/Magento/Customer/etc/adminhtml/system.xml
+++ b/app/code/Magento/Customer/etc/adminhtml/system.xml
@@ -81,7 +81,7 @@
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                     <backend_model>Magento\Customer\Model\Config\Backend\CreateAccount\DisableAutoGroupAssignDefault</backend_model>
                 </field>
-                <field id="vat_frontend_visibility" translate="label" type="select" sortOrder="58" showInDefault="1" showInWebsite="1" showInStore="0">
+                <field id="vat_frontend_visibility" translate="label comment" type="select" sortOrder="58" showInDefault="1" showInWebsite="1" showInStore="0">
                     <label>Show VAT Number on Storefront</label>
                     <comment>To show VAT number on Storefront, set Show VAT Number on Storefront option to Yes.</comment>
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
@@ -120,7 +120,7 @@
                     <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                 </field>
             </group>
-            <group id="password" translate="label comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
+            <group id="password" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
                 <label>Password Options</label>
                 <field id="forgot_email_template" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                     <label>Forgot Email Template</label>
diff --git a/app/code/Magento/ProductAlert/composer.json b/app/code/Magento/ProductAlert/composer.json
index 4dd2b0681df..7a271e1a01d 100644
--- a/app/code/Magento/ProductAlert/composer.json
+++ b/app/code/Magento/ProductAlert/composer.json
@@ -3,6 +3,7 @@
     "description": "N/A",
     "require": {
         "php": "~5.5.0|~5.6.0",
+        "magento/module-backend": "0.74.0-beta16",
         "magento/module-store": "0.74.0-beta16",
         "magento/module-catalog": "0.74.0-beta16",
         "magento/module-customer": "0.74.0-beta16",
diff --git a/dev/tests/integration/framework/Magento/TestFramework/App/State.php b/dev/tests/integration/framework/Magento/TestFramework/App/State.php
index aba2c28f1b2..35a64efbedd 100644
--- a/dev/tests/integration/framework/Magento/TestFramework/App/State.php
+++ b/dev/tests/integration/framework/Magento/TestFramework/App/State.php
@@ -22,7 +22,7 @@ class State extends \Magento\Framework\App\State
     /**
      * {@inheritdoc}
      */
-    public function setAreaCode($code, $force = false)
+    public function setAreaCode($code)
     {
         $this->_areaCode = $code;
         $this->_configScope->setCurrentScope($code);
diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php
index 6746d9bb194..3ba87cb00b6 100644
--- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php
+++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/EmailTest.php
@@ -80,8 +80,8 @@ class EmailTest extends \PHPUnit_Framework_TestCase
         /** @var \Magento\TestFramework\Mail\Template\TransportBuilderMock $transportBuilder */
         $transportBuilder = $this->_objectManager->get('Magento\TestFramework\Mail\Template\TransportBuilderMock');
         $this->assertContains(
-            'John Smith',
-            $transportBuilder->getSentMessage()->getBodyHtml()->getContent()
+            'John Smith,',
+            $transportBuilder->getSentMessage()->getBodyHtml()->getRawContent()
         );
     }
 
diff --git a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php
index 1d00f3ebcd4..062eade2ca5 100644
--- a/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php
+++ b/dev/tests/integration/testsuite/Magento/ProductAlert/Model/ObserverTest.php
@@ -53,8 +53,8 @@ class ObserverTest extends \PHPUnit_Framework_TestCase
         /** @var \Magento\TestFramework\Mail\Template\TransportBuilderMock $transportBuilder */
         $transportBuilder = $this->_objectManager->get('Magento\TestFramework\Mail\Template\TransportBuilderMock');
         $this->assertContains(
-            'John Smith',
-            $transportBuilder->getSentMessage()->getBodyHtml()->getContent()
+            'John Smith,',
+            $transportBuilder->getSentMessage()->getBodyHtml()->getRawContent()
         );
     }
 }
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php
index f028b38b2d9..c15d0b54ba0 100755
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php
@@ -3785,5 +3785,6 @@ return [
     ['Magento\GoogleShopping\Test\Unit\Model\ConfigTest'],
     ['Magento\GoogleShopping\Test\Unit\Model\MassOperationsTest'],
     ['Magento\GoogleShopping\Test\Unit\Model\ObserverTest'],
-    ['Magento\GoogleShopping\Test\Unit\Model\ServiceTest']
+    ['Magento\GoogleShopping\Test\Unit\Model\ServiceTest'],
+    ['Magento\Framework\View\Asset\ModuleNotation\Resolver', 'Magento\Framework\View\Asset\NotationResolver\Module']
 ];
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
index 8b3840e561d..c1a40d98ce4 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php
@@ -2313,7 +2313,7 @@ return [
         'setHelper',
         'Magento\Authorizenet\Model\Directpost',
         'Magento\Authorizenet\Model\Directpost::setDataHelper()'
-    ]
+    ],
     ['_getPayPalPaymentsPro3dSecure', 'Magento\Config\Test\Repository\Config'],
     [
         'getCreatedAtFormated',
@@ -2324,5 +2324,8 @@ return [
         '_getConfig',
         'Magento\Store\Model\Store',
         'Magento\Store\Model\Store::getConfig',
-    ]
+    ],
+    ['getChilds', 'Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer', 'getChildren'],
+    ['getChilds', 'Magento\Bundle\Block\Sales\Order\Items\Renderer', 'getChildren'],
+    ['getChilds', 'Magento\Bundle\Model\Sales\Order\Pdf\Items\AbstractItems', 'getChildren'],
 ];
diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php
index 6200e3fcf96..70598646726 100644
--- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php
+++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php
@@ -85,5 +85,6 @@ return [
     ['Magento\Framework\Test\Utility', 'Magento\Framework\App\Utility'],
     ['Magento\GoogleShopping'],
     ['Magento\Paypal\Block\Standard'],
-    ['Magento\Paypal\Controller\Standard']
+    ['Magento\Paypal\Controller\Standard'],
+    ['Magento\Framework\View\Asset\ModuleNotation']
 ];
diff --git a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php
index f42407ab048..67ca1fcf4b5 100644
--- a/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php
+++ b/lib/internal/Magento/Framework/Filter/Test/Unit/TemplateTest.php
@@ -177,7 +177,8 @@ EXPECTED_RESULT;
                     'b' => 'bee',
                     'd' => 'dee',
                 ],
-                'a:3:{s:7:"param_1";s:7:"value_1";s:7:"param_2";s:5:"lorem";s:7:"param_3";a:2:{s:1:"a";s:3:"bee";s:1:"c";s:3:"dee";}}',
+                'a:3:{s:7:"param_1";s:7:"value_1";s:7:"param_2";s:5:"lorem";s:7:"param_3";a:2:{s:1:"a";s:3:"bee";'
+                    . 's:1:"c";s:3:"dee";}}',
             ],
         ];
     }
diff --git a/lib/internal/Magento/Framework/View/Asset/NotationResolver/Variable.php b/lib/internal/Magento/Framework/View/Asset/NotationResolver/Variable.php
index acf0704ec40..07d5de144aa 100644
--- a/lib/internal/Magento/Framework/View/Asset/NotationResolver/Variable.php
+++ b/lib/internal/Magento/Framework/View/Asset/NotationResolver/Variable.php
@@ -8,6 +8,9 @@ namespace Magento\Framework\View\Asset\NotationResolver;
 
 use Magento\Framework\View\Asset;
 
+/**
+ * Variable resolver to allow specific placeholders in CSS files
+ */
 class Variable
 {
     /**
@@ -37,7 +40,7 @@ class Variable
      * Replaces the placeholder variables into the given path
      *
      * @param string $path
-     * @return mixed
+     * @return string
      */
     public function convertVariableNotation($path)
     {
diff --git a/lib/internal/Magento/Framework/View/Asset/PreProcessor/VariableNotation.php b/lib/internal/Magento/Framework/View/Asset/PreProcessor/VariableNotation.php
index f3f8e1d475b..8abecd1fd83 100644
--- a/lib/internal/Magento/Framework/View/Asset/PreProcessor/VariableNotation.php
+++ b/lib/internal/Magento/Framework/View/Asset/PreProcessor/VariableNotation.php
@@ -11,8 +11,9 @@ use Magento\Framework\View\Asset\NotationResolver;
 use Magento\Framework\View\Url\CssResolver;
 
 /**
- * Class VariableNotation
- * @package Magento\Framework\View\Asset\PreProcessor
+ * Support of notation "{{variable}}" in CSS-files
+ *
+ * Used to replace placeholder variables (such as {{base_url_path}}) with dynamic values.
  */
 class VariableNotation implements Asset\PreProcessorInterface
 {
@@ -27,6 +28,8 @@ class VariableNotation implements Asset\PreProcessorInterface
     private $notationResolver;
 
     /**
+     * Constructor
+     *
      * @param CssResolver $cssResolver
      * @param NotationResolver\Variable $notationResolver
      */
diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/NotationResolver/VariableTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/NotationResolver/VariableTest.php
index decb3a6215c..0fc1f524c39 100644
--- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/NotationResolver/VariableTest.php
+++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/NotationResolver/VariableTest.php
@@ -42,7 +42,7 @@ class VariableTest extends \PHPUnit_Framework_TestCase
             ->method('getStaticViewFileContext')
             ->will($this->returnValue($this->context));
 
-        $this->object = new NotationResolver\Variable($this->assetRepo);
+        $this->object = new \Magento\Framework\View\Asset\NotationResolver\Variable($this->assetRepo);
     }
 
     /**
-- 
GitLab