enableColourSupport() public method

a plugin may still choose to not output colour. one example of this are consoles. they're happy to output colour if talking to a terminal, but choose not to output colour if they're only writing to log files or to a pipe into another UNIX process.
public enableColourSupport ( ) : void
return void
Exemplo n.º 1
0
 /**
  * @covers DataSift\Storyplayer\Output::enableColourSupport()
  */
 public function testCanEnableColourSupport()
 {
     // ----------------------------------------------------------------
     // setup the test
     $plugin1 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin1->shouldReceive('enableColourSupport')->once();
     $plugin2 = Mockery::mock("DataSift\\Storyplayer\\OutputLib\\OutputPlugin");
     $plugin2->shouldReceive('enableColourSupport')->once();
     $obj = new Output();
     $obj->usePluginInSlot($plugin1, "console");
     $obj->usePluginInSlot($plugin2, "slot1");
     // ----------------------------------------------------------------
     // perform the change
     $obj->enableColourSupport();
     // ----------------------------------------------------------------
     // test the results
     Mockery::close();
 }