Skip to content

Commit

Permalink
Merge pull request #53 from SpacePossum/3_0_CS_updates
Browse files Browse the repository at this point in the history
PHP7.2 add to tests / CS updates
  • Loading branch information
SpacePossum authored Jan 3, 2018
2 parents 24742c7 + 174f6fc commit 19fa0f0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
17 changes: 7 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,24 @@ matrix:
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- php: 7.1
env: COMPOSER_FLAGS="--prefer-stable"
- php: 7.2
env: COMPOSER_FLAGS="--prefer-stable"
- php: nightly
env: COMPOSER_FLAGS="--dev"
- php: hhvm-nightly
sudo: required
dist: trusty
group: edge
env: COMPOSER_FLAGS="--dev"
allow_failures:
- php: nightly
- php: hhvm-nightly

install:
- travis_retry composer update $COMPOSER_FLAGS --no-interaction -v
- composer info -D | sort
- if [[ $TRAVIS_PHP_VERSION = 7.0 ]]; then curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.4.0/php-cs-fixer.phar -o php-cs-fixer.phar; fi
- if [[ $TRAVIS_PHP_VERSION = 7.0 ]]; then curl -L https://github.com/maglnet/ComposerRequireChecker/releases/download/0.1.5/composer-require-checker.phar -o composer-require-checker.phar; fi
- if [[ $TRAVIS_PHP_VERSION = 7.0.22 ]]; then curl -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.9.0/php-cs-fixer.phar -o php-cs-fixer.phar; fi
- if [[ $TRAVIS_PHP_VERSION = 7.0.22 ]]; then curl -L https://github.com/maglnet/ComposerRequireChecker/releases/download/0.1.5/composer-require-checker.phar -o composer-require-checker.phar; fi

script:
- chmod 755 tests/assets/dir
- chmod 644 tests/assets/dir/test_file.txt
- phpenv config-rm xdebug.ini || return 0
- vendor/bin/phpunit --verbose
- if [[ $TRAVIS_PHP_VERSION = 7.0 ]]; then php php-cs-fixer.phar fix --dry-run -vvv; fi
- if [[ $TRAVIS_PHP_VERSION = 7.0 ]]; then php composer-require-checker.phar check --config-file=$TRAVIS_BUILD_DIR/.composer-require-checker.json -vvv; fi
- echo $TRAVIS_PHP_VERSION
- if [[ $TRAVIS_PHP_VERSION = 7.0.22 ]]; then php php-cs-fixer.phar fix --dry-run -vvv; fi
- if [[ $TRAVIS_PHP_VERSION = 7.0.22 ]]; then php composer-require-checker.phar check --config-file=$TRAVIS_BUILD_DIR/.composer-require-checker.json -vvv; fi
14 changes: 7 additions & 7 deletions src/PHPUnit/Constraints/FilePermissionsIsIdenticalConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,19 @@ public function toString()
*/
private static function getFilePermissionsAsString($perms)
{
if (($perms & 0xC000) === 0xC000) { // Socket
if (0xC000 === ($perms & 0xC000)) { // Socket
$info = 's';
} elseif (($perms & 0xA000) === 0xA000) { // Symbolic Link
} elseif (0xA000 === ($perms & 0xA000)) { // Symbolic Link
$info = 'l';
} elseif (($perms & 0x8000) === 0x8000) { // Regular
} elseif (0x8000 === ($perms & 0x8000)) { // Regular
$info = '-';
} elseif (($perms & 0x6000) === 0x6000) { // Block special
} elseif (0x6000 === ($perms & 0x6000)) { // Block special
$info = 'b';
} elseif (($perms & 0x4000) === 0x4000) { // Directory
} elseif (0x4000 === ($perms & 0x4000)) { // Directory
$info = 'd';
} elseif (($perms & 0x2000) === 0x2000) { // Character special
} elseif (0x2000 === ($perms & 0x2000)) { // Character special
$info = 'c';
} elseif (($perms & 0x1000) === 0x1000) { // FIFO pipe
} elseif (0x1000 === ($perms & 0x1000)) { // FIFO pipe
$info = 'p';
} else { // Unknown
$info = 'u';
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPUnit/Tests/ReadMe/ReadMeGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function generateReadMe(array $classes): string
}

if (array_key_exists('requires', $classDoc['tags'])) {
if (count($classDoc['tags']['requires']) === 1) {
if (1 === count($classDoc['tags']['requires'])) {
$doc .= sprintf("Requires %s.\n", $classDoc['tags']['requires'][0]);
} else {
$doc .= "Requires:\n";
Expand Down

0 comments on commit 19fa0f0

Please sign in to comment.