Skip to content

Commit 086b7ca

Browse files
author
Dmytro Vilchynskyi
committed
MAGETWO-33407: Cover MAGETWO-31855 changes by static tests
- fixed static tests
1 parent 5687322 commit 086b7ca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/code/Magento/Cookie/View/frontend/templates/html/notices.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
?>
1010
<?php /** @var \Magento\Cookie\Block\Html\Notices $block */ ?>
11-
<?php if ($block->helper('Magento\Cookie\Helper\Cookie')->isUserNotAllowSaveCookie()): ?>
11+
<?php if ($this->helper('Magento\Cookie\Helper\Cookie')->isUserNotAllowSaveCookie()): ?>
1212
<div class="message global cookie" id="notice-cookie-block" style="display: none">
1313
<div class="content">
1414
<p>
@@ -32,8 +32,8 @@
3232
$('#notice-cookie-block').mage('cookieNotices', {
3333
cookieAllowButtonSelector: '#btn-cookie-allow',
3434
cookieName: '<?php echo \Magento\Cookie\Helper\Cookie::IS_USER_ALLOWED_SAVE_COOKIE ?>',
35-
cookieValue: '<?php echo $block->helper('Magento\Cookie\Helper\Cookie')->getAcceptedSaveCookiesWebsiteIds() ?>',
36-
cookieLifetime: <?php echo $block->helper('Magento\Cookie\Helper\Cookie')->getCookieRestrictionLifetime()?>,
35+
cookieValue: '<?php echo $this->helper('Magento\Cookie\Helper\Cookie')->getAcceptedSaveCookiesWebsiteIds() ?>',
36+
cookieLifetime: <?php echo $this->helper('Magento\Cookie\Helper\Cookie')->getCookieRestrictionLifetime()?>,
3737
noCookiesUrl: '<?php echo $block->getUrl('cookie/index/noCookies') ?>'
3838
});
3939
// ]]>

dev/tests/static/testsuite/Magento/Test/Legacy/PhtmlTemplateTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ public function testBlockVariableInsteadOfThis()
1414
$invoker = new \Magento\Framework\Test\Utility\AggregateInvoker($this);
1515
$invoker(
1616
/**
17-
* Test usage of methods and variables in template throught $this
17+
* Test usage of methods and variables in template through $this
1818
*
1919
* @param string $file
2020
*/
2121
function ($file) {
2222
$this->assertNotRegExp(
2323
'/this->(?!helper)\S*/iS',
2424
file_get_contents($file),
25-
'Access to members and methods of Block class throught $this is ' .
25+
'Access to members and methods of Block class through $this is ' .
2626
'obsolete in phtml templates. Use only $block instead of $this.'
2727
);
2828
},

0 commit comments

Comments
 (0)