public function testSetGetEventDispatcher() { $config = new Config(); $eventDispatcher = \Phake::mock('LaunchKey\\SDK\\EventDispatcher\\EventDispatcher'); $config->setEventDispatcher($eventDispatcher); $this->assertSame($eventDispatcher, $config->getEventDispatcher()); }
public function testWpFactorySetsTheEventDispatcher() { $expected = new SynchronousLocalEventDispatcher(); $config = new Config(); $config->setEventDispatcher($expected); $client = Client::wpFactory($config); $this->assertSame($expected, $client->eventDispatcher()); }