public function test_tryToChangeFulfilledPromise() { $promiseData = $this->object->create([]); $promiseData[Store::STATE] = Client::FULFILLED; $promiseData[Store::RESULT] = 'test_result_success_fulfill'; $this->object->update($promiseData); $promise = new Client($this->store, $promiseData[Store::ID]); $result = $promise->wait(false); $this->assertEquals('test_result_success_fulfill', $result); $this->assertEquals(Client::FULFILLED, $promise->getState()); $promiseData[Store::STATE] = Client::REJECTED; $this->setExpectedExceptionRegExp('\\zaboy\\rest\\DataStore\\DataStoreException'); $this->object->update($promiseData); }