public function createRuntime($methods = [])
{
$methods = array_merge($methods, ['getManager', 'getCore']);
$manager = $this->getMock(RuntimeManagerInterface::class, [], [], '', false);
$core = $this->getMock(Core::class, ['make'], []);
$core->expects($this->any())->method('make')->will($this->returnValue(null));
$runtime = $this->getMock(RuntimeContainer::class, $methods, ['parent', 'alias', 'name']);
$runtime->expects($this->any())->method('getManager')->will($this->returnValue($manager));
$runtime->expects($this->any())->method('getCore')->will($this->returnValue($core));
if ($this->cmd !== null) {
$this->setProtectedProperty($this->cmd, 'runtime', $runtime);
}
$this->manager = $manager;
$this->runtime = $runtime;
$this->core = $core;
return $runtime;
}