shouldReceive('get')->with('database.foo', null)->andReturn('foo'); $this->assertEquals('foo', $db->getConfig('foo')); $config->shouldReceive('get')->with('database', [])->andReturn([]); $this->assertEquals([], $db->getConfig()); $callback = function () { }; $event->shouldReceive('listen')->with('db.some', $callback); $db->event('some', $callback); $event->shouldReceive('trigger')->with('db.some', null, false); $db->trigger('some'); } }