public function MobileNumberFieldTest::createMobileNumberNodeFromInput in Mobile Number 8
Same name and namespace in other branches
- 2.0.x src/Tests/MobileNumberFieldTest.php \Drupal\mobile_number\Tests\MobileNumberFieldTest::createMobileNumberNodeFromInput()
Create node with mobile number(s).
2 calls to MobileNumberFieldTest::createMobileNumberNodeFromInput()
- MobileNumberFieldTest::testNumberValidity in src/
Tests/ MobileNumberFieldTest.php - Test number validation.
- MobileNumberFieldTest::testVerification in src/
Tests/ MobileNumberFieldTest.php - Test number verification.
File
- src/
Tests/ MobileNumberFieldTest.php, line 288
Class
- MobileNumberFieldTest
- Mobile number field functionality.'.
Namespace
Drupal\mobile_number\TestsCode
public function createMobileNumberNodeFromInput($name, $input) {
$values = [];
$values["field_{$name}"][0] = $input;
$mobile_number = $this->util
->getMobileNumber($input['mobile'], $input['country-code']);
return $this
->submitNodeForm($name, $values, $mobile_number ? $this->util
->getCallableNumber($mobile_number) : NULL);
}