eZ\Bundle\EzPublishCoreBundle\Tests\Converter\ContentParamConverterTest::testApplyContentOptionalWithEmptyAttribute PHP Method

testApplyContentOptionalWithEmptyAttribute() public method

    public function testApplyContentOptionalWithEmptyAttribute()
    {
        $request = new Request([], [], [self::PROPERTY_NAME => null]);
        $config = $this->createConfiguration(self::CONTENT_CLASS, 'content');
        $config->expects($this->once())->method('isOptional')->will($this->returnValue(true));
        $this->assertFalse($this->converter->apply($request, $config));
        $this->assertNull($request->attributes->get('content'));
    }