From 243c0e12c225d11773bdb089e795b1ca94acbc65 Mon Sep 17 00:00:00 2001 From: alexisparron Date: Thu, 20 Jul 2017 17:23:22 +0200 Subject: [PATCH] corrected test name to describe correctly the function --- tests/Spout/Writer/XLSX/SheetTest.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/Spout/Writer/XLSX/SheetTest.php b/tests/Spout/Writer/XLSX/SheetTest.php index 77554bc..22d4d84 100644 --- a/tests/Spout/Writer/XLSX/SheetTest.php +++ b/tests/Spout/Writer/XLSX/SheetTest.php @@ -47,7 +47,7 @@ class SheetTest extends \PHPUnit_Framework_TestCase { $fileName = 'test_set_name_should_create_sheet_with_custom_name.xlsx'; $customSheetName = 'CustomName'; - $this->writeDataAndReturnSheetWithCustomName($fileName, $customSheetName); + $this->writeDataToSheetWithCustomName($fileName, $customSheetName); $this->assertSheetNameEquals($customSheetName, $fileName, "The sheet name should have been changed to '$customSheetName'"); } @@ -82,10 +82,9 @@ class SheetTest extends \PHPUnit_Framework_TestCase public function testSetSheetVisibilityShouldCreateSheetHidden() { $fileName = 'test_set_visibility_should_create_sheet_hidden.xlsx'; - // $customSheetName = 'CustomName'; - $this->writeDataAndReturnSheetHidden($fileName); + $this->writeDataToHiddenSheet($fileName); - $this->assertSheetVisibilityEquals(false, $fileName, "The sheet visibility should have been changed to 'false'"); + $this->assertIsHiddenSheet( $fileName, "The sheet visibility should have been changed to 'hidden'"); } /** @@ -93,7 +92,7 @@ class SheetTest extends \PHPUnit_Framework_TestCase * @param string $sheetName * @return Sheet */ - private function writeDataAndReturnSheetWithCustomName($fileName, $sheetName) + private function writeDataToSheetWithCustomName($fileName, $sheetName) { $this->createGeneratedFolderIfNeeded($fileName); $resourcePath = $this->getGeneratedResourcePath($fileName); @@ -132,9 +131,9 @@ class SheetTest extends \PHPUnit_Framework_TestCase /** * @param string $fileName - * @return Sheet + * @return void */ - private function writeDataAndReturnSheetHidden($fileName) + private function writeDataToHiddenSheet($fileName) { $this->createGeneratedFolderIfNeeded($fileName); $resourcePath = $this->getGeneratedResourcePath($fileName); @@ -170,7 +169,7 @@ class SheetTest extends \PHPUnit_Framework_TestCase * @param string $message * @return void */ - private function assertSheetVisibilityEquals($expectedVisibility, $fileName, $message = '') + private function assertIsHiddenSheet( $fileName, $message = '') { $resourcePath = $this->getGeneratedResourcePath($fileName); $pathToWorkbookFile = $resourcePath . '#xl/workbook.xml';