public function RngEventTypeMappingFormTest::testMappingFormDeleted in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 src/Tests/RngEventTypeMappingFormTest.php \Drupal\rng\Tests\RngEventTypeMappingFormTest::testMappingFormDeleted()
- 8 src/Tests/RngEventTypeMappingFormTest.php \Drupal\rng\Tests\RngEventTypeMappingFormTest::testMappingFormDeleted()
Test mapping form when a field does not exist.
File
- src/
Tests/ RngEventTypeMappingFormTest.php, line 56
Class
- RngEventTypeMappingFormTest
- Tests RNG event type mapping form.
Namespace
Drupal\rng\TestsCode
public function testMappingFormDeleted() {
$url = $this->eventType
->toUrl('field-mapping');
$this
->drupalGet($url);
//$this->removeWhiteSpace();
$this
->assertSession()
->responseContains('<td>Minimum registrants</td><td>Minimum number of registrants per registration.</td><td>Does not exist</td>');
$this
->assertFieldById('edit-table-rng-registrants-minimum-operations-create', 'Create', "Create button exists for 'minimum registrants' field");
// Test the field is added back.
$this
->drupalPostForm($url, [], t('Create'));
// $this->removeWhiteSpace();
$this
->assertSession()
->responseContains('<td>Minimum registrants</td><td>Minimum number of registrants per registration.</td><td>Exists</td>');
$this
->assertText('Field Minimum registrants added.');
}