protected function getKernelMock($options) { $mock = $this->getMockForAbstractClass(AspectKernel::class, [], '', false, true, true, array('getOptions')); $mock->expects($this->any())->method('getOptions')->will($this->returnValue($options)); return $mock; }