public function UserRegistrationResourceTest::testEmptyPost in Drupal 9
Same name and namespace in other branches
- 8 core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php \Drupal\Tests\user\Unit\UserRegistrationResourceTest::testEmptyPost()
- 10 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 79
Class
- UserRegistrationResourceTest
- Tests User Registration REST resource.
Namespace
Drupal\Tests\user\UnitCode
public function testEmptyPost() {
$this
->expectException(BadRequestHttpException::class);
$this->testClass
->post(NULL);
}