appendStyleSheet() public method

Appends a stylesheet to the stylesheet array.
public appendStyleSheet ( string $path )
$path string Path to the stylesheet. It can be relative path to the Public/static folder or a full http path.
Example #1
0
 public function testStyleSheets()
 {
     $view = new View();
     $styleOne = 'styleOne.js';
     $styleTwo = 'styleTwo.js';
     $styleThree = 'styleThree.js';
     $view->appendStyleSheet($styleOne);
     $view->prependStyleSheet($styleTwo);
     $view->appendStyleSheet($styleThree);
     $stylesArray = $view->getStyleSheets();
     $expectedArray = [$styleTwo, $styleOne, $styleThree];
     $this->assertSame($expectedArray, $stylesArray);
     $html = '';
     foreach ($expectedArray as $s) {
         $html .= '<link rel="stylesheet" type="text/css" href="' . $s . '"/>' . "\n";
     }
     $this->assertSame($html, $view->getStyleSheetsHtml());
 }