Neos\Flow\Tests\Unit\Mvc\ActionRequestTest::setControllerObjectNameSplitsTheGivenObjectNameIntoItsParts PHP Method

setControllerObjectNameSplitsTheGivenObjectNameIntoItsParts() public method

public setControllerObjectNameSplitsTheGivenObjectNameIntoItsParts ( string $objectName, array $parts )
$objectName string
$parts array
    public function setControllerObjectNameSplitsTheGivenObjectNameIntoItsParts($objectName, array $parts)
    {
        $mockObjectManager = $this->createMock(ObjectManagerInterface::class);
        $mockObjectManager->expects($this->any())->method('getCaseSensitiveObjectName')->with($objectName)->will($this->returnValue($objectName));
        $mockObjectManager->expects($this->any())->method('getPackageKeyByObjectName')->with($objectName)->will($this->returnValue($parts['controllerPackageKey']));
        $this->inject($this->actionRequest, 'objectManager', $mockObjectManager);
        $this->actionRequest->setControllerObjectName($objectName);
        $this->assertSame($parts['controllerPackageKey'], $this->actionRequest->getControllerPackageKey());
        $this->assertSame($parts['controllerSubpackageKey'], $this->actionRequest->getControllerSubpackageKey());
        $this->assertSame($parts['controllerName'], $this->actionRequest->getControllerName());
    }
ActionRequestTest