Skip to content

Commit 888c041

Browse files
committed
Updated tests with mikey179/vfsstream
1 parent fd42ab5 commit 888c041

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

.github/workflows/phpunit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
php_version: '8.2'
2323

2424
- name: Run tests & generate Coverage
25-
run: bin/phpunit functional --coverage-html var/coverage
25+
run: bin/phpunit --coverage-html var/coverage
2626

2727
- name: Store coverage files
2828
uses: actions/upload-artifact@v3

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"phpstan/phpstan": "^1.10",
2929
"infection/infection": "^0.26.18",
3030
"rector/rector": "^0.15",
31-
"php-etl/csv-flow": "^0.3.0"
31+
"php-etl/csv-flow": "^0.3.0",
32+
"mikey179/vfsstream": "^1.6"
3233
},
3334
"autoload": {
3435
"psr-4": {

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/functional/Builder/BuilderTestCase.php

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,26 @@
33
namespace functional\Kiboko\Plugin\CSV\Builder;
44

55
use functional\Kiboko\Plugin\CSV;
6-
use Kiboko\Component\PHPUnitExtension\BuilderAssertTrait;
7-
use Kiboko\Component\PHPUnitExtension\PipelineAssertTrait;
6+
use Kiboko\Component\PHPUnitExtension\Assert\PipelineBuilderAssertTrait;
87
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
9-
use PhpParser\Builder as DefaultBuilder;
10-
use PHPUnit\Framework\Constraint\LogicalNot;
8+
use org\bovigo\vfs\vfsStream;
9+
use org\bovigo\vfs\vfsStreamDirectory;
10+
use org\bovigo\vfs\vfsStreamWrapper;
1111
use PHPUnit\Framework\TestCase;
12-
use Vfs\FileSystem;
1312

1413
abstract class BuilderTestCase extends TestCase
1514
{
16-
use BuilderAssertTrait;
17-
18-
private ?FileSystem $fs = null;
15+
use PipelineBuilderAssertTrait;
1916

17+
private ?vfsStreamDirectory $fs = null;
2018
protected function setUp(): void
2119
{
22-
$this->fs = FileSystem::factory('vfs://');
23-
$this->fs->mount();
20+
$this->fs = vfsStream::setup();
2421
}
25-
2622
protected function tearDown(): void
2723
{
28-
$this->fs->unmount();
2924
$this->fs = null;
25+
vfsStreamWrapper::unregister();
3026
}
3127

3228
public function pipelineRunner(): PipelineRunnerInterface

0 commit comments

Comments
 (0)