DataSift\Storyplayer\Output::getPlugins PHP Method

getPlugins() public method

get the array of all plugins
public getPlugins ( ) : array
return array
    public function getPlugins()
    {
        return $this->plugins;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @covers DataSift\Storyplayer\Output::getPlugins()
  */
 public function testCanGetAllActivePlugins()
 {
     // ----------------------------------------------------------------
     // setup the test
     $obj = new Output();
     $slotName = 'unit-test';
     $origPlugin = Mockery::mock('DataSift\\Storyplayer\\OutputLib\\OutputPlugin');
     $obj->usePluginInSlot($origPlugin, $slotName);
     $console = $obj->getActiveConsolePlugin();
     // ----------------------------------------------------------------
     // perform the change
     $plugins = $obj->getPlugins();
     // ----------------------------------------------------------------
     // test the results
     $this->assertTrue(is_array($plugins));
     $this->assertEquals(2, count($plugins));
     $this->assertSame($console, $plugins['console']);
     $this->assertSame($origPlugin, $plugins[$slotName]);
     Mockery::close();
 }