Skip to content

Commit

Permalink
Add DIRECTORY_SEPARATOR in other places
Browse files Browse the repository at this point in the history
  • Loading branch information
arogachev committed Mar 18, 2024
1 parent d1090ef commit 0991195
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Command/Schema/SchemaPhpCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function testExecuteWithoutFile(): void

public function testExecuteWithFile(): void
{
$file = \dirname(__DIR__) . '/Stub/schema.php';
$file = implode(DIRECTORY_SEPARATOR, [\dirname(__DIR__), 'Stub', 'schema.php']);

$schema = $this->createMock(SchemaInterface::class);
$schema->expects($this->any())->method('getRoles')->willReturn(['foo', 'bar']);
Expand All @@ -82,7 +82,7 @@ public function testExecuteWithFile(): void

public function testExecuteWithFileAndAlias(): void
{
$file = \dirname(__DIR__) . '/Stub/alias-schema.php';
$file = implode(DIRECTORY_SEPARATOR, [\dirname(__DIR__), 'Stub', 'alias-schema.php']);

$schema = $this->createMock(SchemaInterface::class);
$schema->expects($this->any())->method('getRoles')->willReturn(['foo', 'bar']);
Expand All @@ -93,7 +93,7 @@ public function testExecuteWithFileAndAlias(): void
$container = new SimpleContainer([SchemaInterface::class => $schema]);
$promise = new CycleDependencyProxy($container);
$command = new SchemaPhpCommand(new Aliases([
'@test' => \dirname(__DIR__) . '/Stub',
'@test' => \dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Stub',
]), $promise);

$code = $command->run(new ArrayInput(['file' => '@test/alias-schema.php']), $this->output);
Expand All @@ -110,7 +110,7 @@ public function testExecuteWithFileAndAlias(): void

public function testExecuteWithMissingDirectory(): void
{
$file = \dirname(__DIR__) . '/Stub/Foo/schema.php';
$file = implode(DIRECTORY_SEPARATOR, [\dirname(__DIR__), 'Stub', 'Foo', 'schema.php']);

$schema = $this->createMock(SchemaInterface::class);
$schema->expects($this->any())->method('getRoles')->willReturn(['foo', 'bar']);
Expand All @@ -137,7 +137,7 @@ public function testExecuteWithMissingDirectory(): void

public function testExecuteWithFileWriteError(): void
{
$file = \dirname(__DIR__) . '/Stub/schema.php';
$file = implode(DIRECTORY_SEPARATOR, [\dirname(__DIR__), 'Stub', 'schema.php']);

$schema = $this->createMock(SchemaInterface::class);
$schema->expects($this->any())->method('getRoles')->willReturn(['foo', 'bar']);
Expand Down

0 comments on commit 0991195

Please sign in to comment.