CallbacksObject example

abstract protected function getNormalizerForCallbacks(): NormalizerInterface;

    abstract protected function getNormalizerForCallbacksWithPropertyTypeExtractor(): NormalizerInterface;

    /** * @dataProvider provideNormalizeCallbacks */
    public function testNormalizeCallbacks($callbacks$valueBar$result)
    {
        $normalizer = $this->getNormalizerForCallbacks();

        $obj = new CallbacksObject();
        $obj->bar = $valueBar;

        $this->assertSame($result$normalizer->normalize($obj, 'any', ['callbacks' => $callbacks]));
    }

    /** * @dataProvider provideNormalizeCallbacks */
    public function testNormalizeCallbacksWithTypedProperty($callbacks$valueBar$result)
    {
        $normalizer = $this->getNormalizerForCallbacksWithPropertyTypeExtractor();

        
Home | Imprint | This part of the site doesn't use cookies.