Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions tests/KernelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ public function commandsOnObjects(): void
}

/**
* @param string $path
* @param string $command
* @param int $depth
* @param int $depth
* @param array{
* command: string,
* depth: int,
Expand All @@ -99,15 +100,15 @@ public function commandsOnObjects(): void
*/
#[Testing]
#[DataProvider('executeProvider')]
public function execute(string $command, int $depth, array $return): void
public function execute(string $path, string $command, int $depth, array $return): void
{
$this->createDirectory('./storage/files/');
$this->createDirectory($path);

$this->createImage();
$this->createImage(path: $path);

$this->assertSame($return, $this->kernel->execute($command, $depth));

$this->rmdirRecursively('./storage');
$this->rmdirRecursively('./storage/');
}

#[Testing]
Expand Down
16 changes: 8 additions & 8 deletions tests/Providers/KernelProviderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ public static function executeProvider(): array
/** @phpstan-ignore-next-line */
return [
[
'path' => './storage/',
'command' => 'cd ./storage/ && ls',
'depth' => 0,
'return' => [
'files',
'depth' => 0,
'return' => [
'image.png',
],
],
[
'command' => 'ls',
'depth' => 1,
'return' => [
/** @phpstan-ignore-next-line */
FOLDER_PATH,
'path' => './storage/files/',
'command' => 'cd ./storage/files && ls',
'depth' => 0,
'return' => [
'image.png',
],
],
];
Expand Down