1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-07-09 10:33:55 +02:00
This commit is contained in:
Ne-Lexa
2020-01-09 12:05:02 +03:00
parent a16b0e7c15
commit 6c49dd54c8
2 changed files with 28 additions and 22 deletions

View File

@ -1,14 +1,26 @@
dist: trusty dist: trusty
language: php language: php
php:
- '5.5' env:
- '5.6' global:
- '7.0' - PHPUNIT_FLAGS="-v -c phpunit.xml --testsuite only_fast_tests"
- '7.1'
- '7.2' matrix:
- '7.3' include:
- '7.4' - php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
env: COVERAGE=false
- php: 7.4
env: COVERAGE=true PHPUNIT_FLAGS="-v -c phpunit.xml --testsuite only_fast_tests --format=php-clover coverage.clover"
before_install:
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
install: install:
- travis_retry composer self-update && composer --version - travis_retry composer self-update && composer --version
@ -16,11 +28,11 @@ install:
before_script: before_script:
- sudo apt-get install p7zip-full - sudo apt-get install p7zip-full
- composer validate --no-check-lock
script: script:
- composer validate --no-check-lock
- vendor/bin/phpunit -v -c phpunit.xml --testsuite only_fast_tests --coverage-clover=coverage.clover - vendor/bin/phpunit -v -c phpunit.xml --testsuite only_fast_tests --coverage-clover=coverage.clover
after_success: after_success:
- wget https://scrutinizer-ci.com/ocular.phar - if [[ $COVERAGE = true ]]; wget https://scrutinizer-ci.com/ocular.phar; fi
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover - if [[ $COVERAGE = true ]]; php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

View File

@ -770,20 +770,14 @@ class ZipEntryTest extends TestCase
* @dataProvider provideDosTime * @dataProvider provideDosTime
* *
* @param int $dosTime * @param int $dosTime
* @param int $timestamp
*/ */
public function testDosTime($dosTime, $timestamp) public function testDosTime($dosTime)
{ {
$zipEntry = new ZipEntry('entry'); $zipEntry = new ZipEntry('entry');
static::assertSame($zipEntry->getDosTime(), ZipEntry::UNKNOWN); static::assertSame($zipEntry->getDosTime(), ZipEntry::UNKNOWN);
$zipEntry->setDosTime($dosTime); $zipEntry->setDosTime($dosTime);
static::assertSame($zipEntry->getDosTime(), $dosTime); static::assertSame($zipEntry->getDosTime(), $dosTime);
static::assertSame($zipEntry->getTime(), $timestamp);
$zipEntry->setTime($timestamp);
static::assertSame($zipEntry->getTime(), $timestamp);
static::assertSame($zipEntry->getDosTime(), $dosTime);
} }
/** /**
@ -792,10 +786,10 @@ class ZipEntryTest extends TestCase
public function provideDosTime() public function provideDosTime()
{ {
return [ return [
[0, 312757200], [0],
[1043487716, 1295339468], [1043487716],
[1177556759, 1421366206], [1177556759],
[1282576076, 1521384864], [1282576076],
]; ];
} }