function UserRegistrationResourceTest::testEmptyPost
Same name in other branches
- 9 core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php \Drupal\Tests\user\Unit\UserRegistrationResourceTest::testEmptyPost()
- 8.9.x core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php \Drupal\Tests\user\Unit\UserRegistrationResourceTest::testEmptyPost()
- 11.x core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php \Drupal\Tests\user\Unit\UserRegistrationResourceTest::testEmptyPost()
Tests that an exception is thrown when no data provided for the account.
File
-
core/
modules/ user/ tests/ src/ Unit/ UserRegistrationResourceTest.php, line 92
Class
- UserRegistrationResourceTest
- Tests User Registration REST resource.
Namespace
Drupal\Tests\user\UnitCode
public function testEmptyPost() : void {
$this->expectException(BadRequestHttpException::class);
$this->testClass
->post(NULL);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.