Skip to content

Commit 781be16

Browse files
authored
Merge pull request #4 from Codeception/php8
PHP 8 support
2 parents cae4df5 + 6590386 commit 781be16

File tree

6 files changed

+11
-236
lines changed

6 files changed

+11
-236
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4]
11+
php: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
1212

1313
steps:
1414
- name: Checkout code
@@ -24,9 +24,7 @@ jobs:
2424
run: composer validate
2525

2626
- name: Install dependencies
27-
run: |
28-
composer require phpunit/phpunit "<=8.5.2" --no-update --ignore-platform-reqs
29-
composer install --prefer-dist --no-progress --no-interaction --no-suggest
27+
run: composer install --prefer-dist --no-progress --no-interaction --no-suggest
3028

3129
- name: Run test suite
3230
run: php vendor/bin/codecept run

Robofile.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@
1515
],
1616
"minimum-stability": "RC",
1717
"require": {
18-
"php": ">=5.6.0 <8.0",
18+
"php": ">=5.6.0 <9.0",
1919
"codeception/codeception": "^4.0",
2020
"symfony/finder": ">=2.7 <6.0"
2121
},
22-
"require-dev": {
23-
"codeception/util-robohelpers": "dev-master"
24-
},
2522
"conflict": {
2623
"codeception/codeception": "<4.0"
2724
},

documentation.md

Lines changed: 0 additions & 199 deletions
This file was deleted.

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ composer require --dev "codeception/module-filesystem"
1010

1111
## Documentation
1212

13-
<a href="documentation.md">Look at documentation.md file</a>
13+
<a href="https://codeception.com/docs/modules/Filesystem">Module documentation</a>

src/Codeception/Module/Filesystem.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function openFile($filename)
9595
public function deleteFile($filename)
9696
{
9797
if (!file_exists($this->absolutizePath($filename))) {
98-
\PHPUnit\Framework\Assert::fail('file not found');
98+
\Codeception\PHPUnit\TestCase::fail('file not found');
9999
}
100100
unlink($this->absolutizePath($filename));
101101
}
@@ -204,7 +204,7 @@ public function seeThisFileMatches($regex)
204204
public function seeFileContentsEqual($text)
205205
{
206206
$file = str_replace("\r", '', $this->file);
207-
\PHPUnit\Framework\Assert::assertEquals($text, $file);
207+
\Codeception\PHPUnit\TestCase::assertEquals($text, $file);
208208
}
209209

210210
/**
@@ -249,7 +249,7 @@ public function seeFileFound($filename, $path = '')
249249
{
250250
if ($path === '' && file_exists($filename)) {
251251
$this->openFile($filename);
252-
\PHPUnit\Framework\Assert::assertFileExists($filename);
252+
\Codeception\PHPUnit\TestCase::assertFileExists($filename);
253253
return;
254254
}
255255

@@ -260,7 +260,7 @@ public function seeFileFound($filename, $path = '')
260260
}
261261

262262
$this->openFile($found);
263-
\PHPUnit\Framework\Assert::assertFileExists($found);
263+
\Codeception\PHPUnit\TestCase::assertFileExists($found);
264264
}
265265

266266
/**
@@ -272,19 +272,19 @@ public function seeFileFound($filename, $path = '')
272272
public function dontSeeFileFound($filename, $path = '')
273273
{
274274
if ($path === '') {
275-
\PHPUnit\Framework\Assert::assertFileNotExists($filename);
275+
\Codeception\PHPUnit\TestCase::assertFileNotExists($filename);
276276
return;
277277
}
278278

279279
$found = $this->findFileInPath($filename, $path);
280280

281281
if ($found === false) {
282282
//this line keeps a count of assertions correct
283-
\PHPUnit\Framework\Assert::assertTrue(true);
283+
\Codeception\PHPUnit\TestCase::assertTrue(true);
284284
return;
285285
}
286286

287-
\PHPUnit\Framework\Assert::assertFileNotExists($found);
287+
\Codeception\PHPUnit\TestCase::assertFileNotExists($found);
288288
}
289289

290290
/**

0 commit comments

Comments
 (0)