getMockBuilder(taoResultServer_models_classes_OutcomeVariable::class)->disableOriginalConstructor()->getMock(); $var = new TestVariableStorable('deliveryResultIdentifier', 'test', $resultVariable, 'callIdTest'); $this->assertInstanceOf(\JsonSerializable::class, $var); $this->assertEquals([ "deliveryResultIdentifier" => 'deliveryResultIdentifier', "test" => 'test', "item" => null, "variable" => serialize($resultVariable), "callIdItem" => null, "uri" => 'deliveryResultIdentifiercallIdTest', "callIdTest" => 'callIdTest', "class" => get_class($resultVariable) ], $var->jsonSerialize()); } }