/** * @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(); }