public function testStoreTestVariable() { $deliveryResultIdentifier = "MyDeliveryResultIdentifier#1"; $test = "MyGreatTest#3"; $callId = "MyCallId#3"; $testVariable = new \taoResultServer_models_classes_OutcomeVariable(); $testVariable->setBaseType('float'); $testVariable->setCardinality('multiple'); $testVariable->setEpoch(microtime()); $testVariable->setIdentifier('TestIdentifier'); $testVariable->setValue('MyValue'); $this->instance->storeTestVariable($deliveryResultIdentifier, $test, $testVariable, $callId); $tmp = $this->instance->getVariable($callId, 'TestIdentifier'); $object = array_shift($tmp)[0]; $this->assertEquals($test, $object->test); $this->assertNull($object->item); $this->assertEquals('float', $object->variable->getBaseType()); $this->assertEquals('multiple', $object->variable->getCardinality()); $this->assertEquals('TestIdentifier', $object->variable->getIdentifier()); $this->assertEquals('MyValue', $object->variable->getValue()); $this->assertInstanceOf('taoResultServer_models_classes_OutcomeVariable', $object->variable); $this->assertEquals('float', $this->instance->getVariableProperty($object->uri, 'baseType')); $this->assertEquals('multiple', $this->instance->getVariableProperty($object->uri, 'cardinality')); $this->assertEquals('TestIdentifier', $this->instance->getVariableProperty($object->uri, 'identifier')); $this->assertEquals('MyValue', $this->instance->getVariableProperty($object->uri, 'value')); }