protected function ServicesClientPluginsTestCase::createFakeEvent in Services Client 7.2
Create new event.
Parameters
array $values: Override custom values.
Return value
8 calls to ServicesClientPluginsTestCase::createFakeEvent()
- ServicesClientPluginsTestCase::testServicesClientFieldCondition in tests/
plugin.test - ServicesClientPluginsTestCase::testServicesClientFieldD6Formatter in tests/
plugin.test - ServicesClientPluginsTestCase::testServicesClientFieldFormatter in tests/
plugin.test - ServicesClientPluginsTestCase::testServicesClientFieldReader in tests/
plugin.test - ServicesClientPluginsTestCase::testServicesClientPropertyCondition in tests/
plugin.test
File
- tests/
plugin.test, line 37 - Rules tests.
Class
- ServicesClientPluginsTestCase
- @file Rules tests.
Code
protected function createFakeEvent($values = array()) {
$event = new ServicesClientEvent();
$values += array(
'eid' => 1,
'title' => $this
->randomName(),
'name' => $this
->randomName(),
'connection' => $this
->randomName(),
'entity_type' => 'node',
'event' => 'save',
'plugin' => 'EntitySaveHandler',
'config' => array(),
);
foreach ($values as $key => $val) {
$event->{$key} = $val;
}
return $event;
}