From d3b8674bd6b0b76bde15b40329ca392a2520548f Mon Sep 17 00:00:00 2001 From: Brandon Payton Date: Mon, 23 Dec 2024 14:38:38 -0500 Subject: [PATCH] Mark UnzipStep tests as skipped --- tests/unit/steps/UnzipStepRunnerTest.php | 50 +++++++++++++----------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/tests/unit/steps/UnzipStepRunnerTest.php b/tests/unit/steps/UnzipStepRunnerTest.php index c84305cd..95dffc24 100644 --- a/tests/unit/steps/UnzipStepRunnerTest.php +++ b/tests/unit/steps/UnzipStepRunnerTest.php @@ -63,33 +63,39 @@ public function after() { $this->filesystem->remove( $this->document_root ); } - // public function testUnzipFileWhenUsingAbsolutePath() { - // $zip = __DIR__ . '/resources/test_zip.zip'; - // $this->resource_manager->method( 'getStream' ) - // ->willReturn( fopen( $zip, 'rb' ) ); + public function testUnzipFileWhenUsingAbsolutePath() { + // TODO: Remove once UnzipStep is implemented + $this->markTestSkipped('UnzipStep not yet implemented.'); - // $step = new UnzipStep(); - // $step->setZipFile( $zip ); - // $extracted_file_path = $this->runtime->resolvePath( 'dir/test_zip.txt' ); - // $step->setExtractToPath( Path::getDirectory( $extracted_file_path ) ); + $zip = __DIR__ . '/resources/test_zip.zip'; + $this->resource_manager->method( 'getStream' ) + ->willReturn( fopen( $zip, 'rb' ) ); - // $this->step_runner->run( $step, new Tracker() ); + $step = new UnzipStep(); + $step->setZipFile( $zip ); + $extracted_file_path = $this->runtime->resolvePath( 'dir/test_zip.txt' ); + $step->setExtractToPath( Path::getDirectory( $extracted_file_path ) ); - // self::assertFileEquals( __DIR__ . '/resources/test_zip.txt', $extracted_file_path ); - // } + $this->step_runner->run( $step, new Tracker() ); - // public function testUnzipFileWhenUsingRelativePath() { - // $zip = __DIR__ . '/resources/test_zip.zip'; - // $this->resource_manager->method( 'getStream' ) - // ->willReturn( fopen( $zip, 'rb' ) ); + self::assertFileEquals( __DIR__ . '/resources/test_zip.txt', $extracted_file_path ); + } + + public function testUnzipFileWhenUsingRelativePath() { + // TODO: Remove once UnzipStep is implemented + $this->markTestSkipped('UnzipStep not yet implemented.'); - // $step = new UnzipStep(); - // $step->setZipFile( $zip ); - // $step->setExtractToPath( 'dir' ); + $zip = __DIR__ . '/resources/test_zip.zip'; + $this->resource_manager->method( 'getStream' ) + ->willReturn( fopen( $zip, 'rb' ) ); - // $this->step_runner->run( $step, new Tracker() ); + $step = new UnzipStep(); + $step->setZipFile( $zip ); + $step->setExtractToPath( 'dir' ); - // $extracted_file_path = $this->runtime->resolvePath( 'dir/test_zip.txt' ); - // self::assertFileEquals( __DIR__ . '/resources/test_zip.txt', $extracted_file_path ); - // } + $this->step_runner->run( $step, new Tracker() ); + + $extracted_file_path = $this->runtime->resolvePath( 'dir/test_zip.txt' ); + self::assertFileEquals( __DIR__ . '/resources/test_zip.txt', $extracted_file_path ); + } }