styles() 공개 메소드

Handles styling output.
public styles ( array | boolean $styles = [] ) : array
$styles array | boolean
리턴 array
예제 #1
0
 public function testStyledOutput()
 {
     $base = Libraries::get(true, 'resources') . '/tmp/tests';
     $this->skipIf(!is_writable($base), "Path `{$base}` is not writable.");
     $response = new Response(array('output' => fopen($this->streams['output'], 'w+')));
     $response->styles(array('heading' => ""));
     $response->output('{:heading}ok');
     $this->assertEqual("ok", file_get_contents($this->streams['output']));
 }
예제 #2
0
 public function testStyledOutput()
 {
     $base = Libraries::get(true, 'resources') . '/tmp/tests';
     $this->skipIf(!is_writable($base), "Path `{$base}` is not writable.");
     $response = new Response(array('output' => fopen($this->streams['output'], 'w+')));
     $response->styles(array('heading' => ""));
     $response->output('{:heading}ok');
     $expected = "ok";
     if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         $expected = 'ok';
     }
     $this->assertEqual($expected, file_get_contents($this->streams['output']));
 }