You are here

protected function SalesforceMappingTestCase::assertRadioOptionSelected in Salesforce Suite 7.3

Assert if the given radio field has the given value selected.

I could not find a reliable way of ensuring that a radio option was actually checked. I added these helper asserts to streamline the testing of the mapping forms.

Parameters

string $name: Name of field to assert.

string $value: (optional) Value of the field to assert.

string $message: (optional) Message to display.

string $group: (optional) The group this message belongs to.

Return value

bool TRUE on pass, FALSE on fail.

1 call to SalesforceMappingTestCase::assertRadioOptionSelected()
SalesforceMappingMapTestCase::testMappingCreate in modules/salesforce_mapping/tests/salesforce_mapping.map.test
Tests the creation of a map.

File

modules/salesforce_mapping/tests/salesforce_mapping.test, line 366

Class

SalesforceMappingTestCase
Sets up basic tools for the testing of mapping Drupal to Salesforce.

Code

protected function assertRadioOptionSelected($name, $value, $message = '', $group = 'Other') {
  $matches = $this
    ->checkRadioOptionSelected($name, $value);
  return $this
    ->assertTrue($matches, $message, $group);
}