From 9b1d304c5a32b2fa5fdc41ba5ceebf28b1957c47 Mon Sep 17 00:00:00 2001 From: Jonathan Maron Date: Thu, 2 Aug 2018 08:10:11 +0200 Subject: [PATCH] Improved tests; updated changelog --- CHANGELOG.md | 5 +++++ demo/get-template-info.php | 2 -- test/ReportingCloudTest.php | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 672e4961..b7d55369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ ## dev-master +## 1.8.0 - 2018-08-02 + +* Added `user_document_properties` key (containing an array) to the return value of `getTemplateInfo($templateName)`, following the addition of an [extension](https://www.textcontrol.com/blog/2018/07/27/retrieve-user-defined-properties-from-templates/) on the backend. +* Updated demo `get-template-info.php` to exemplify `user_document_properties` key and array. + ## 1.7.0 - 2018-01-25 * Added method `uploadTemplateFromBase64($data, $templateName)` to upload templates stored in a string, in addition to on the filesystem. diff --git a/demo/get-template-info.php b/demo/get-template-info.php index 1d34a54d..0579e4fa 100644 --- a/demo/get-template-info.php +++ b/demo/get-template-info.php @@ -21,8 +21,6 @@ $sourceFilename = REPORTING_CLOUD_DEMO_MEDIA_PATH . DIRECTORY_SEPARATOR . $templateName; - // Upload template, if not already in template storage - if (!$reportingCloud->templateExists($templateName)) { $reportingCloud->uploadTemplate($sourceFilename); } diff --git a/test/ReportingCloudTest.php b/test/ReportingCloudTest.php index cc0f677d..4835352d 100644 --- a/test/ReportingCloudTest.php +++ b/test/ReportingCloudTest.php @@ -262,6 +262,10 @@ public function testGetTemplateInfo() $this->assertArrayHasKey('text_after', $response['merge_fields'][0]); $this->assertArrayHasKey('text_before', $response['merge_fields'][0]); + $this->assertArrayHasKey('user_document_properties', $response); + + $this->assertInternalType(PHPUnit_IsType::TYPE_ARRAY, $response['user_document_properties']); + $response = $this->reportingCloud->deleteTemplate($tempTemplateName); $this->assertTrue($response);