Skip to content

Commit 7360787

Browse files
author
Bohdan Korablov
committed
MAGETWO-62491: [PR] Delivery of stories (sprint 3)
1 parent f6bf2a2 commit 7360787

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

app/code/Magento/Config/Model/Placeholder/Environment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ public function restore($template)
7171
*/
7272
public function isApplicable($placeholder)
7373
{
74-
return 1 === preg_match('/(' . static::PREFIX . '.*[a-zA-Z_]).*/', $placeholder);
74+
return 1 === preg_match('/^' . static::PREFIX . '([a-zA-Z]+)([a-zA-Z0-9_])*$/', $placeholder);
7575
}
7676
}

app/code/Magento/Config/Test/Unit/Model/Placeholder/EnvironmentTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function getGenerateDataProvider()
8484
public function testIsApplicable($placeholder, $expected)
8585
{
8686
$this->assertSame(
87-
$this->model->isApplicable($placeholder),
88-
$expected
87+
$expected,
88+
$this->model->isApplicable($placeholder)
8989
);
9090
}
9191

@@ -98,6 +98,9 @@ public function getIsPlaceholderDataProvider()
9898
[Environment::PREFIX . 'TEST', true],
9999
['TEST', false],
100100
[Environment::PREFIX . 'TEST_test', true],
101+
[Environment::PREFIX . '-:A', false],
102+
[Environment::PREFIX . '_A', false],
103+
[Environment::PREFIX . 'A@#$', false]
101104
];
102105
}
103106
}

lib/internal/Magento/Framework/Crontab/CrontabManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ private function checkSupportedOs()
192192
{
193193
if (stripos(PHP_OS, 'WIN') === 0) {
194194
throw new LocalizedException(
195-
new Phrase('Your operation system is not supported, you cannot work with crontab')
195+
new Phrase('Your operation system is not supported to work with this command')
196196
);
197197
}
198198
}

0 commit comments

Comments
 (0)