Skip to content

Commit

Permalink
Fix test for PHP 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Smirnov committed Jun 11, 2024
1 parent af20ac8 commit 7081938
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
php-versions: ['5.6', '7.0', '7.1']
php-versions: ['5.6', '7.0', '7.1','7.2','7.3']

services:
memcached:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=5.6,<7.2",
"php": ">=5.6,<=7.3.34",
"ext-mbstring": "*"
},
"require-dev": {
Expand Down
7 changes: 4 additions & 3 deletions modules/unittest/classes/Kohana/Unittest/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ public static function assertNotTag($matcher, $actual, $message = '', $isHtml =
{
$dom = PHPUnit_Util_XML::load($actual, $isHtml);
$tags = static::findNodes($dom, $matcher, $isHtml);
$matched = count($tags) > 0 && $tags[0] instanceof DOMNode;

self::assertFalse($matched, $message);
if (is_array($tags)) {
$matched = count($tags) > 0 && $tags[0] instanceof DOMNode;
self::assertFalse($matched, $message);
}
}

/**
Expand Down
14 changes: 7 additions & 7 deletions system/tests/kohana/DateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function tearDown()
public function provider_offset()
{
return [
[30600, 'Asia/Calcutta', 'America/Argentina/Buenos_Aires'],
[30600, 'Asia/Kolkata', 'America/Argentina/Buenos_Aires'],
];
}

Expand Down Expand Up @@ -262,22 +262,22 @@ public function provider_formatted_time()
],
// Timezones (see #3902)
[
'2011-04-01 01:23:45 Antarctica/South_Pole',
'2011-04-01 01:23:45 Pacific/Auckland',
'2011-04-01 01:23:45',
'Y-m-d H:i:s e',
'Antarctica/South_Pole'
'Pacific/Auckland'
],
[
'2011-04-01 01:23:45 Antarctica/South_Pole',
'2011-04-01 01:23:45 Pacific/Auckland',
'2011-03-31 14:23:45 Europe/Paris',
'Y-m-d H:i:s e',
'Antarctica/South_Pole'
'Pacific/Auckland'
],
[
'2011-04-01 01:23:45 Antarctica/South_Pole',
'2011-04-01 01:23:45 Pacific/Auckland',
'@1301574225',
'Y-m-d H:i:s e',
'Antarctica/South_Pole'
'Pacific/Auckland'
],
];
}
Expand Down

0 comments on commit 7081938

Please sign in to comment.