コード例 #1
0
ファイル: StyleHelperTest.php プロジェクト: cheaterBY/spout
 /**
  * @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());
 }
コード例 #2
0
ファイル: FileSystemHelper.php プロジェクト: nekulin/spout
 /**
  * Creates the "styles.xml" file under the "xl" folder
  *
  * @param StyleHelper $styleHelper
  * @return FileSystemHelper
  */
 public function createStylesFile($styleHelper)
 {
     $stylesXmlFileContents = $styleHelper->getStylesXMLFileContent();
     $this->createFileWithContents($this->xlFolder, self::STYLES_XML_FILE_NAME, $stylesXmlFileContents);
     return $this;
 }