From 30dd61eb23d64f26c595ffe5c95d8fc2ee328753 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 7 Oct 2016 13:59:45 +0200 Subject: Disable special handling of {elapsed_time} and {memory_usage} Documentation says that the variable can be set from the controller, but it's protected and thus throws and exception. Good documentation is hard to come by... Signed-off-by: Florian Pritz --- application/test/tests/test_api_v2.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'application/test') diff --git a/application/test/tests/test_api_v2.php b/application/test/tests/test_api_v2.php index b50af4bcf..7335c3bdd 100644 --- a/application/test/tests/test_api_v2.php +++ b/application/test/tests/test_api_v2.php @@ -359,6 +359,19 @@ class test_api_v2 extends \test\Test { $this->t->is($ret["data"]["total_size"], 0, "total_size = 0 since no uploads"); } + public function test_history_specialVarsNotExpanded() + { + $apikey = $this->createUserAndApikey(); + $uploadid = $this->uploadFile($apikey, "data/tests/{elapsed_time}.txt")['data']['ids'][0]; + + $ret = $this->CallEndpoint("POST", "file/history", array( + "apikey" => $apikey, + )); + $this->expectSuccess("get history", $ret); + + $this->t->is($ret["data"]["items"][$uploadid]['filename'], '{elapsed_time}.txt', "{elapsed_time} is not expanded in history reply"); + } + public function test_delete_canDeleteUploaded() { $apikey = $this->createUserAndApikey(); -- cgit v1.2.3-24-g4f1b