lithium\tests\cases\console\ResponseTest::testStyledOutput PHP Метод

testStyledOutput() публичный Метод

public testStyledOutput ( )
    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']));
    }