You are here

protected function SalesforceMappingTestCase::assertNoRadioOptionSelected in Salesforce Suite 7.3

Assert if the given radio field does not have 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.

File

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

Class

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

Code

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