Change behavior of \@mobile directive in template v2 #2510

This commit is contained in:
Kijin Sung 2025-03-18 22:51:22 +09:00
parent 82195c3e14
commit 800eb2f444
4 changed files with 15 additions and 5 deletions

View file

@ -858,10 +858,10 @@ class TemplateParserV2Test extends \Codeception\Test\Unit
'@endmobile',
]);
$target = implode("\n", [
"<?php if (!\\Context::get('m')): ?>",
'<?php if (!$this->_v2_isMobile()): ?>',
'<p>4K or GTFO!</p>',
'<?php endif; ?>',
"<?php if (\\Context::get('m')): ?>",
'<?php if ($this->_v2_isMobile()): ?>',
'<p>USB C is the way to go~</p>',
'<?php endif; ?>',
]);