Skip to content

Commit

Permalink
#2370 - Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Oct 16, 2022
1 parent 74809f0 commit f5f5260
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions tests/Extension/ArrayAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public function testIssue1094(): void
*/
public function testIssue1086StaticallyCalledFunctionWithArrayAsArgMustReturnArray(): void
{
if (version_compare(PHP_VERSION, '8.1.0', '>')) {
$this->markTestSkipped('Deprecated Callable Patterns');
return;
}

$class = new \Stub\ArrayAccessTest();

$actual = $class->issue1086WontNullArrayAfterPassViaStaticWithStrictParams();
Expand Down
10 changes: 6 additions & 4 deletions tests/Extension/ArrayObjectTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of the Zephir.
*
Expand All @@ -11,6 +9,8 @@
* the LICENSE file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Extension;

use PHPUnit\Framework\TestCase;
Expand All @@ -23,8 +23,10 @@ public function testSetGet(): void
$test = new ArrayObject();
$this->assertInstanceOf('\ArrayObject', $test);

$test->test_1 = 1;
$this->assertSame(1, $test->test_1);
if (version_compare(PHP_VERSION, '8.2.0', '<')) {
$test->test_1 = 1;
$this->assertSame(1, $test->test_1);
}

$test['test_2'] = 1;
$this->assertSame(1, $test['test_2']);
Expand Down

0 comments on commit f5f5260

Please sign in to comment.