Inheritance: extends Box\Spout\Writer\Common\Helper\AbstractStyleHelper
Exemple #1
0
 /**
  * @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());
 }
Exemple #2
0
 /**
  * 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;
 }