public function createRouter($methods = null) { $mock = $this->getMock(RouterComposite::class, $methods, [], '', false); $this->setProtectedProperty($this->channel, 'router', $mock); return $mock; }