Skip to content

Commit 7a23cad

Browse files
committed
Ignore E2E test data for Git export
- Fixes #621 Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
1 parent a193ec7 commit 7a23cad

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
/tools export-ignore
55
/tests/benchmarks export-ignore
6+
/tests/data export-ignore
67
.gitattributes export-ignore
78
.gitignore export-ignore
89
.editorconfig export-ignore

tests/TestCase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PhpMyAdmin\SqlParser\Translator;
1616
use PHPUnit\Framework\TestCase as BaseTestCase;
1717

18+
use function file_exists;
1819
use function file_get_contents;
1920
use function str_contains;
2021
use function strpos;
@@ -93,6 +94,10 @@ public function getErrorsAsArray($obj): array
9394
*/
9495
public function getData(string $name): array
9596
{
97+
if (! file_exists('tests/data/' . $name . '.out')) {
98+
self::markTestSkipped('Test data not available.');
99+
}
100+
96101
$serializedData = file_get_contents('tests/data/' . $name . '.out');
97102
$this->assertIsString($serializedData);
98103

0 commit comments

Comments
 (0)