Neos\Flow\Tests\Unit\Validation\ValidatorResolverTest::resolveValidatorObjectNameCanResolveShorthandValidatornames PHP Метод

resolveValidatorObjectNameCanResolveShorthandValidatornames() публичный Метод

    public function resolveValidatorObjectNameCanResolveShorthandValidatornames()
    {
        $this->mockObjectManager->expects($this->at(0))->method('get')->with(ReflectionService::class)->will($this->returnValue($this->mockReflectionService));
        $this->mockObjectManager->expects($this->at(1))->method('isRegistered')->with('Mypkg:My')->will($this->returnValue(false));
        $this->mockObjectManager->expects($this->at(2))->method('isRegistered')->with('Mypkg\\Validation\\Validator\\MyValidator')->will($this->returnValue(true));
        $this->mockReflectionService->expects($this->any())->method('getAllImplementationClassNamesForInterface')->with(ValidatorInterface::class)->will($this->returnValue(['Mypkg\\Validation\\Validator\\MyValidator']));
        $this->assertSame('Mypkg\\Validation\\Validator\\MyValidator', $this->validatorResolver->_call('resolveValidatorObjectName', 'Mypkg:My'));
    }
ValidatorResolverTest