Skip to content

Commit 4c22303

Browse files
author
Matthew O'Loughlin
committed
GH-26255: Fix logic error around handling both string/array params. Fix failing test case.
1 parent e212301 commit 4c22303

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/CacheInvalidate/Model/PurgeCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function __construct(
6969
*/
7070
public function sendPurgeRequest($tags)
7171
{
72-
if (!is_string($tags)) {
72+
if (is_string($tags)) {
7373
$tags = [$tags];
7474
}
7575

app/code/Magento/CacheInvalidate/Test/Unit/Observer/InvalidateVarnishObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function setUp()
5454
public function testInvalidateVarnish()
5555
{
5656
$tags = ['cache_1', 'cache_group'];
57-
$pattern = '((^|,)cache_1(,|$))|((^|,)cache_group(,|$))';
57+
$pattern = ['((^|,)cache_1(,|$))', '((^|,)cache_group(,|$))'];
5858

5959
$this->configMock->expects($this->once())->method('isEnabled')->will($this->returnValue(true));
6060
$this->configMock->expects(

0 commit comments

Comments
 (0)