public function ResourceResponseValidatorTest::testValidateResponse in Drupal 8
Same name and namespace in other branches
- 9 core/modules/jsonapi/tests/src/Unit/EventSubscriber/ResourceResponseValidatorTest.php \Drupal\Tests\jsonapi\Unit\EventSubscriber\ResourceResponseValidatorTest::testValidateResponse()
@covers ::validateResponse @dataProvider validateResponseProvider
File
- core/
modules/ jsonapi/ tests/ src/ Unit/ EventSubscriber/ ResourceResponseValidatorTest.php, line 102
Class
- ResourceResponseValidatorTest
- @coversDefaultClass \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator @group jsonapi
Namespace
Drupal\Tests\jsonapi\Unit\EventSubscriberCode
public function testValidateResponse($request, $response, $expected, $description) {
// Expose protected ResourceResponseSubscriber::validateResponse() method.
$object = new \ReflectionObject($this->subscriber);
$method = $object
->getMethod('validateResponse');
$method
->setAccessible(TRUE);
$this
->assertSame($expected, $method
->invoke($this->subscriber, $response, $request), $description);
}