public function testIdCanBeSet() { $action = new Action(array('ActionID' => '123')); $this->assertEquals('123', $action->getActionId()); $this->assertEquals('123', $action->getFieldValue('ActionID')); $this->assertEquals('123', $action->getFieldValue('aCtIoNiD')); $this->assertNull($action->getFieldValue('unknown')); }
public function request(Action $message) { $deferred = new Deferred(); if ($this->ending) { $deferred->reject(new Exception('Already ending')); } else { $out = $message->getMessageSerialized(); //var_dump('out', $out); $this->stream->write($out); $this->pending[$message->getActionId()] = $deferred; } return $deferred->promise(); }