function ResourceResponseValidatorTest::testValidateResponse
Tests validate response.
@legacy-covers ::validateResponse
Attributes
#[DataProvider('validateResponseProvider')]
File
-
core/
modules/ jsonapi/ tests/ src/ Unit/ EventSubscriber/ ResourceResponseValidatorTest.php, line 66
Class
Namespace
Drupal\Tests\jsonapi\Unit\EventSubscriberCode
public function testValidateResponse($request, $response, $expected, $description) : void {
// Expose protected ResourceResponseSubscriber::validateResponse() method.
$object = new \ReflectionObject($this->subscriber);
$method = $object->getMethod('validateResponse');
$this->assertSame($expected, $method->invoke($this->subscriber, $response, $request), $description);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.