Skip to content

Commit

Permalink
#16477 - Skip working tests with warnings in PHP8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Dec 23, 2023
1 parent f6319f1 commit 7c00830
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration/Cache/Adapter/Stream/GetSetCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ public function cacheAdapterStreamGetErrors(IntegrationTester $I)
{
$I->wantToTest('Cache\Adapter\Stream - get() - errors');

if (version_compare(PHP_VERSION, '8.3.0', '>=')) {
$I->markTestSkipped('Since PHP 8.3 warnings causing session ID/Name lock.');
}

$serializer = new SerializerFactory();
$adapter = new Stream(
$serializer,
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/Storage/Adapter/ExceptionsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ public function storageAdapterStreamGetErrors(IntegrationTester $I)
{
$I->wantToTest('Storage\Adapter\Stream - get() - errors');

if (version_compare(PHP_VERSION, '8.3.0', '>=')) {
$I->markTestSkipped('Invalid `unserialize()` will generate warning but still works.');
}

$serializer = new SerializerFactory();
$adapter = new Stream(
$serializer,
Expand Down
5 changes: 5 additions & 0 deletions tests/integration/Storage/Serializer/ExceptionsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ function () {
public function storageSerializerPhpUnserializeError(IntegrationTester $I)
{
$I->wantToTest('Storage\Serializer\Php - unserialize() - error');

if (version_compare(PHP_VERSION, '8.3.0', '>=')) {
$I->markTestSkipped('Invalid `unserialize()` will generate warning but still works.');
}

$serializer = new Php();

$serialized = '{??hello?unserialize"';
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/Http/Response/GetSetStatusCodeCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ public function testSetStatusCodeDefaultMessage(UnitTester $I)
*/
public function testHttpResponseSetStatusCodeSend(UnitTester $I)
{
if (!function_exists('xdebug_get_headers')) {
$I->skipTest('xdebug extension is not installed');
}

$response = $this->getResponseObject();

$body = ['test' => 123];
Expand Down Expand Up @@ -180,6 +184,10 @@ public function testHttpResponseSetStatusCodeSend(UnitTester $I)
*/
public function testHttpResponseSetStatusCodeSendMicro(UnitTester $I)
{
if (!function_exists('xdebug_get_headers')) {
$I->skipTest('xdebug extension is not installed');
}

$application = new Micro($this->container);

$application->before(new HttpResponseContentMiddleware());
Expand Down

0 comments on commit 7c00830

Please sign in to comment.