mirror of
https://github.com/rlanvin/php-rrule.git
synced 2025-02-26 15:54:14 +01:00
parent
cb5c6f44f2
commit
b4337c8935
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@ -7,11 +7,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
|
||||
php: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
|
||||
name: PHP ${{ matrix.php }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
@ -26,7 +26,7 @@ jobs:
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ matrix.php }}-composer
|
||||
|
@ -6,7 +6,7 @@
|
||||
"homepage": "https://github.com/rlanvin/php-rrule",
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": ">=5.6.0"
|
||||
"php": ">=7.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "Intl extension is needed for humanReadable()"
|
||||
@ -22,7 +22,7 @@
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7|^6.5|^8.0",
|
||||
"phpunit/phpunit": "^8.0",
|
||||
"phpmd/phpmd" : "@stable"
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="false"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="./tests/bootstrap.php"
|
||||
>
|
||||
<testsuites>
|
||||
|
@ -2257,7 +2257,7 @@ class RRuleTest extends TestCase
|
||||
$rule = @ new RRule($str);
|
||||
|
||||
if ($occurrences) {
|
||||
$this->assertEquals($occurrences, $rule->getOccurrences(), '', 1);
|
||||
$this->assertEquals($occurrences, $rule->getOccurrences());
|
||||
}
|
||||
}
|
||||
|
||||
@ -2803,10 +2803,10 @@ class RRuleTest extends TestCase
|
||||
'DTSTART' => '2016-01-01'
|
||||
);
|
||||
$rrule = new RRule($array);
|
||||
$this->assertInternalType('array', $rrule->getRule());
|
||||
$this->assertIsArray($rrule->getRule());
|
||||
$rule = $rrule->getRule();
|
||||
$this->assertEquals('YEARLY', $rule['FREQ']);
|
||||
$this->assertInternalType('string', $rule['DTSTART']);
|
||||
$this->assertIsString($rule['DTSTART']);
|
||||
|
||||
$rrule = new RRule("DTSTART;TZID=America/New_York:19970901T090000\nRRULE:FREQ=HOURLY;UNTIL=19971224T000000Z;WKST=SU;BYDAY=MO,WE,FR;BYMONTH=1;BYHOUR=1");
|
||||
$rule = $rrule->getRule();
|
||||
|
@ -591,13 +591,13 @@ class RSetTest extends TestCase
|
||||
'DTSTART' => date_create('1997-09-02 09:00')
|
||||
));
|
||||
|
||||
$this->assertInternalType('array', $rset->getRRules());
|
||||
$this->assertIsArray($rset->getRRules());
|
||||
$this->assertCount(2, $rset->getRRules());
|
||||
$this->assertInternalType('array', $rset->getExRules());
|
||||
$this->assertIsArray($rset->getExRules());
|
||||
$this->assertCount(1, $rset->getExRules());
|
||||
$this->assertInternalType('array', $rset->getDates());
|
||||
$this->assertIsArray($rset->getDates());
|
||||
$this->assertCount(3, $rset->getDates());
|
||||
$this->assertInternalType('array', $rset->getExDates());
|
||||
$this->assertIsArray($rset->getExDates());
|
||||
$this->assertCount(0, $rset->getExDates());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user