From 8d3eb036a0d3fbbef5093c5c1ad492e5bd0bd0d2 Mon Sep 17 00:00:00 2001 From: Michael Reichardt Date: Sat, 30 Mar 2024 13:05:23 +0100 Subject: [PATCH] Rename some tests and fix indents --- tests/unit/steps/MkdirStepRunnerTest.php | 60 ++++++++++++------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tests/unit/steps/MkdirStepRunnerTest.php b/tests/unit/steps/MkdirStepRunnerTest.php index 3ed3e0bf..901ed4bf 100644 --- a/tests/unit/steps/MkdirStepRunnerTest.php +++ b/tests/unit/steps/MkdirStepRunnerTest.php @@ -51,41 +51,41 @@ public function after() { $this->filesystem->remove( $this->document_root ); } - public function testCreateDirectoryWhenUsingRelativePath() { - $path = 'dir'; - $step = new MkdirStep(); + public function testCreateDirectoryWhenUsingRelativePath() { + $path = 'dir'; + $step = new MkdirStep(); $step->setPath( $path ); - $this->step_runner->run( $step ); - $resolved_path = $this->runtime->resolvePath( $path ); + $this->step_runner->run( $step ); + $resolved_path = $this->runtime->resolvePath( $path ); self::assertDirectoryExists( $resolved_path ); - } + } - public function testCreateDirectoryWhenUsingAbsoluteAbsolutePath() { - $relative_path = 'dir'; - $resolved_path = $this->runtime->resolvePath( $relative_path ); + public function testCreateDirectoryWhenUsingAbsolutePath() { + $relative_path = 'dir'; + $absolute_path = $this->runtime->resolvePath( $relative_path ); - $step = new MkdirStep(); - $step->setPath( $resolved_path ); + $step = new MkdirStep(); + $step->setPath( $absolute_path ); - $this->step_runner->run( $step ); - - self::assertDirectoryExists( $resolved_path ); - } + $this->step_runner->run( $step ); - public function testCreateDirectoryRecursively() { - $path = 'dir/subdir'; - $step = new MkdirStep(); - $step->setPath( $path ); + self::assertDirectoryExists( $absolute_path ); + } - $this->step_runner->run( $step ); + public function testCreateDirectoryRecursively() { + $path = 'dir/subdir'; + $step = new MkdirStep(); + $step->setPath( $path ); - $resolved_path = $this->runtime->resolvePath( $path ); - self::assertDirectoryExists( $resolved_path ); - } + $this->step_runner->run( $step ); + + $resolved_path = $this->runtime->resolvePath( $path ); + self::assertDirectoryExists( $resolved_path ); + } - public function testCreateDirectoryWithProperMode() { + public function testCreateReadableAndWritableDirectory() { $path = 'dir'; $step = new MkdirStep(); $step->setPath( $path ); @@ -97,10 +97,10 @@ public function testCreateDirectoryWithProperMode() { self::assertDirectoryIsWritable( $resolved_path ); self::assertDirectoryIsReadable( $resolved_path ); } - - public function testThrowExceptionWhenCreatingDirectoryWhenDirectoryAlreadyExists() { - $path = 'dir'; - $resolved_path = $this->runtime->resolvePath( $path ); + + public function testThrowExceptionWhenCreatingDirectoryAndItAlreadyExists() { + $path = 'dir'; + $resolved_path = $this->runtime->resolvePath( $path ); $this->filesystem->mkdir( $resolved_path ); $step = new MkdirStep(); @@ -108,6 +108,6 @@ public function testThrowExceptionWhenCreatingDirectoryWhenDirectoryAlreadyExist self::expectException( BlueprintException::class ); self::expectExceptionMessage( "Failed to create \"$resolved_path\": the directory exists." ); - $this->step_runner->run( $step ); - } + $this->step_runner->run( $step ); + } }