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')); }