Skip to content

Commit

Permalink
Move to from travis GitHub actions and fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
websi committed Dec 14, 2023
1 parent 59405e3 commit d08bd80
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
name: PHP Lint with ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

steps:
- uses: actions/checkout@v4
Expand All @@ -24,8 +24,8 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
php-versions: ['8.1', '8.2', '8.3']
name: PHPUnit with ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}

steps:
- uses: actions/checkout@v4
Expand All @@ -36,11 +36,11 @@ jobs:
extensions: intl
- uses: php-actions/composer@v6
with:
php-version: ${{ matrix.php-versions }}
php_version: ${{ matrix.php-versions }}
- uses: php-actions/phpunit@v3
with:
php-version: ${{ matrix.php-versions }}
php_version: ${{ matrix.php-versions }}
bootstrap: vendor/autoload.php
log_junit: 1
testdox_text: 1
args: tests/Unit/
args: tests/Unit/
10 changes: 5 additions & 5 deletions tests/Unit/IncludeFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ protected function tearDown(): void
}
putenv('FOO');
putenv('APP_ENV');
if (file_exists(__DIR__ . '/Fixtures/foo')) {
chmod(__DIR__ . '/Fixtures/foo', 777);
rmdir(__DIR__ . '/Fixtures/foo');
if (file_exists(sys_get_temp_dir() . '/Fixtures/foo')) {
chmod(sys_get_temp_dir() . '/Fixtures/foo', 777);
rmdir(sys_get_temp_dir() . '/Fixtures/foo');
}
}

Expand Down Expand Up @@ -131,8 +131,8 @@ public function dumpReturnsFalseIfFileCannotBeWritten()
$loaderMock->expects($this->once())->method('register');
$loaderMock->expects($this->once())->method('unregister');

mkdir(__DIR__ . '/Fixtures/foo', 000);
$includeFilePath = __DIR__ . '/Fixtures/foo/include.php';
mkdir(sys_get_temp_dir() . '/Fixtures/foo', 000, true);
$includeFilePath = sys_get_temp_dir() . '/Fixtures/foo/include.php';
$includeFile = new IncludeFile($config, $loaderMock, $includeFilePath);
$this->assertFalse($includeFile->dump());
}
Expand Down

0 comments on commit d08bd80

Please sign in to comment.