Skip to content

Commit caa5509

Browse files
ci(test): Fix integration test
1 parent 162669a commit caa5509

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

tests/Integration/AbstractBouncerTest.php

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,16 @@ public function testAppSecFlow()
469469
);
470470

471471
$originCountItem = $cache->getItem(AbstractCache::ORIGINS_COUNT)->get();
472-
$this->assertEquals(
473-
1,
474-
$originCountItem['appsec'],
475-
'The origin count for appsec should be 1'
476-
);
472+
if ($this->useTls) {
473+
$this->assertArrayNotHasKey('appsec', $originCountItem, 'The origin count for appsec should not be present');
474+
} else {
475+
$this->assertEquals(
476+
1,
477+
$originCountItem['appsec'],
478+
'The origin count for appsec should be 1'
479+
);
480+
}
481+
477482
$this->assertEquals(
478483
1,
479484
$originCountItem['clean'],
@@ -494,11 +499,16 @@ public function testAppSecFlow()
494499
);
495500

496501
$originCountItem = $cache->getItem(AbstractCache::ORIGINS_COUNT)->get();
497-
$this->assertEquals(
498-
1,
499-
$originCountItem['clean_appsec'],
500-
'The origin count for clean_appsec should be 1'
501-
);
502+
if ($this->useTls) {
503+
$this->assertArrayNotHasKey('appsec', $originCountItem, 'The origin count for appsec should not be present');
504+
} else {
505+
$this->assertEquals(
506+
1,
507+
$originCountItem['clean_appsec'],
508+
'The origin count for appsec should be 1'
509+
);
510+
}
511+
502512
$this->assertEquals(
503513
1,
504514
$originCountItem['clean'],

0 commit comments

Comments
 (0)