function ResourceTestBase::testIndividual
Same name in other branches
- 11.x core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::testIndividual()
Tests POST/PATCH/DELETE for an individual resource.
1 method overrides ResourceTestBase::testIndividual()
- FileTest::testIndividual in core/
modules/ jsonapi/ tests/ src/ Functional/ FileTest.php - Tests POST/PATCH/DELETE for an individual resource.
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php, line 1968
Class
- ResourceTestBase
- Subclass this for every JSON:API resource type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
public function testIndividual() : void {
$this->doTestPostIndividual();
$this->entity = $this->resaveEntity($this->entity, $this->account);
$this->revokePermissions();
$this->config('jsonapi.settings')
->set('read_only', TRUE)
->save(TRUE);
$this->doTestPatchIndividual();
$this->entity = $this->resaveEntity($this->entity, $this->account);
$this->revokePermissions();
$this->config('jsonapi.settings')
->set('read_only', TRUE)
->save(TRUE);
$this->doTestDeleteIndividual();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.