From 09911959723954525448dad791ac5fe9dc2f2cb1 Mon Sep 17 00:00:00 2001 From: Alexey Rogachev Date: Mon, 18 Mar 2024 17:11:31 +0500 Subject: [PATCH] Add DIRECTORY_SEPARATOR in other places --- tests/Command/Schema/SchemaPhpCommandTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Command/Schema/SchemaPhpCommandTest.php b/tests/Command/Schema/SchemaPhpCommandTest.php index 9e07bf8..6947c68 100644 --- a/tests/Command/Schema/SchemaPhpCommandTest.php +++ b/tests/Command/Schema/SchemaPhpCommandTest.php @@ -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']); @@ -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']); @@ -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); @@ -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']); @@ -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']);