/** * @return void */ public function testApplyExtraStylesIfNeededShouldDoNothingIfWrapTextAlreadyApplied() { $style = (new StyleBuilder())->setShouldWrapText()->build(); $styleHelper = new StyleHelper($this->defaultStyle); $this->assertTrue($style->shouldWrapText()); $updatedStyle = $styleHelper->applyExtraStylesIfNeeded($style, ["multi\nlines"]); $this->assertTrue($updatedStyle->shouldWrapText()); }
/** * Creates the "styles.xml" file under the root folder * * @param StyleHelper $styleHelper * @param int $numWorksheets Number of created worksheets * @return FileSystemHelper */ public function createStylesFile($styleHelper, $numWorksheets) { $stylesXmlFileContents = $styleHelper->getStylesXMLFileContent($numWorksheets); $this->createFileWithContents($this->rootFolder, self::STYLES_XML_FILE_NAME, $stylesXmlFileContents); return $this; }