public function getControllerSubpackageKeyReturnsNullIfNoSubpackageKeyIsSet()
{
/** @var ActionRequest|\PHPUnit_Framework_MockObject_MockObject $actionRequest */
$actionRequest = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->setMethods(['getControllerObjectName'])->getMock();
$actionRequest->expects($this->any())->method('getControllerObjectName')->will($this->returnValue('Neos\\MyPackage\\Controller\\Foo\\BarController'));
/** @var PackageManagerInterface|\PHPUnit_Framework_MockObject_MockObject $mockPackageManager */
$mockPackageManager = $this->createMock(PackageManagerInterface::class);
$mockPackageManager->expects($this->any())->method('getCaseSensitivePackageKey')->with('neos.mypackage')->will($this->returnValue('Neos.MyPackage'));
$this->inject($actionRequest, 'packageManager', $mockPackageManager);
$actionRequest->setControllerPackageKey('neos.mypackage');
$this->assertNull($actionRequest->getControllerSubpackageKey());
}