You are here

protected function ServicesClientBaseWebTestCase::addEventCondition in Services Client 7.2

Adds condition to event.

Parameters

ServicesClientEvent $event: Event where should be condition added.

string $name: Condition plugin name.

array $config: Plugin configuration.

Return value

string New plugin uuid.

4 calls to ServicesClientBaseWebTestCase::addEventCondition()
ServicesClientErrorWebTestCase::testServicesClientErrors in services_client_error/tests/services_client_error.test
ServicesClientHooksWebTestCase::testServicesClientHooks in tests/services_client.test
ServicesClientWebTestCase::testAddingEvent in tests/services_client.test
Test basic event configuration actions.
ServicesClientWebTestCase::testServicesClientProcessing in tests/services_client.test

File

tests/services_client.test, line 143
Tests for the Administration menu module.

Class

ServicesClientBaseWebTestCase
@file Tests for the Administration menu module.

Code

protected function addEventCondition($event, $name, $config) {

  // Test adding new condition
  $this
    ->drupalPost($event
    ->getHandler()
    ->getUrl('add_plugin/condition'), array(
    'type' => $name,
  ), "Save");
  $uuid = $this
    ->getPluginUuidFromUrl();
  $this
    ->drupalPost($event
    ->getHandler()
    ->getUrl('plugin/condition/' . $uuid . '/edit'), $config, "Submit");
  return $uuid;
}