public function getControllerSubpackageKeyExtractsTheSubpackageKeyFromTheControllerObjectNameToAssureTheCorrectCase()
{
/** @var ActionRequest|\PHPUnit_Framework_MockObject_MockObject $actionRequest */
$actionRequest = $this->getMockBuilder(ActionRequest::class)->disableOriginalConstructor()->setMethods(['getControllerObjectName'])->getMock();
$actionRequest->expects($this->once())->method('getControllerObjectName')->will($this->returnValue('Neos\\MyPackage\\Some\\SubPackage\\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');
$actionRequest->setControllerSubpackageKey('some\\subpackage');
$this->assertEquals('Some\\SubPackage', $actionRequest->getControllerSubpackageKey());
}