public function CreateTest::assertCreateEntityInvalidData in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/rest/src/Tests/CreateTest.php \Drupal\rest\Tests\CreateTest::assertCreateEntityInvalidData()
Try to send invalid data that cannot be correctly deserialized.
Parameters
string $entity_type: The type of the entity that should be created.
4 calls to CreateTest::assertCreateEntityInvalidData()
- CreateTest::testCreateComment in core/
modules/ rest/ src/ Tests/ CreateTest.php - Test comment creation.
- CreateTest::testCreateEntityTest in core/
modules/ rest/ src/ Tests/ CreateTest.php - Tests valid and invalid create requests for 'entity_test' entity type.
- CreateTest::testCreateNode in core/
modules/ rest/ src/ Tests/ CreateTest.php - Tests several valid and invalid create requests for 'node' entity type.
- CreateTest::testCreateUser in core/
modules/ rest/ src/ Tests/ CreateTest.php - Tests several valid and invalid create requests for 'user' entity type.
File
- core/
modules/ rest/ src/ Tests/ CreateTest.php, line 407 - Contains \Drupal\rest\Tests\CreateTest.
Class
- CreateTest
- Tests the creation of resources.
Namespace
Drupal\rest\TestsCode
public function assertCreateEntityInvalidData($entity_type) {
$this
->httpRequest('entity/' . $entity_type, 'POST', 'kaboom!', $this->defaultMimeType);
$this
->assertResponse(400);
}