diff --git a/src/Messages/Components/Source.php b/src/Messages/Components/Source.php index 2282d0c..48a52e0 100644 --- a/src/Messages/Components/Source.php +++ b/src/Messages/Components/Source.php @@ -73,8 +73,8 @@ public function getAttributes() { $attributes = [ 'channel' => $this->getChannel(), - 'dealine' => $this->getDeadline(), - 'statusDealine' => $this->getDeadlineStatus(), + 'deadline' => $this->getDeadline(), + 'statusDeadline' => $this->getDeadlineStatus(), 'marked' => $this->getConfidential(), 'format' => $this->getFormat(), 'legiswrite' => $this->getLegiswriteFormat(), diff --git a/templates/components/contact.tpl.php b/templates/components/contact.tpl.php index 2fda013..9db65e4 100644 --- a/templates/components/contact.tpl.php +++ b/templates/components/contact.tpl.php @@ -8,8 +8,8 @@ */ ?> attributes($component->getAttributes()) ?>> - getNickname() ?> + getNickname() ?>]]> getEmail()) : ?> - getEmail() ?> + getEmail() ?>]]> diff --git a/templates/components/reference-document.tpl.php b/templates/components/reference-document.tpl.php index fb94c2b..676d380 100644 --- a/templates/components/reference-document.tpl.php +++ b/templates/components/reference-document.tpl.php @@ -10,13 +10,13 @@ attributes($component->getAttributes()) ?>> getName() ?>]]> getPath()) : ?> - getPath() ?> + getPath() ?>]]> getSize()) : ?> - getSize() ?> + getSize() ?>]]> getRemark()) : ?> getRemark() ?>]]> - getFile() ?> + getFile() ?>]]> diff --git a/templates/components/return-address.tpl.php b/templates/components/return-address.tpl.php index 93f2537..07d7ff2 100644 --- a/templates/components/return-address.tpl.php +++ b/templates/components/return-address.tpl.php @@ -22,3 +22,8 @@ getRemark() ?>]]> + + + + + diff --git a/templates/components/source.tpl.php b/templates/components/source.tpl.php index 8c5f155..e0a2e12 100644 --- a/templates/components/source.tpl.php +++ b/templates/components/source.tpl.php @@ -11,7 +11,7 @@ getName() ?>]]> getFile() ?>]]> getPath()) : ?> - getPath() ?> + getPath() ?>]]> getSourceLanguages()) : ?> getSourceLanguages() as $target) : ?> @@ -19,6 +19,6 @@ getSize()) : ?> - getSize() ?> + getSize() ?>]]> diff --git a/tests/src/SanitizationTest.php b/tests/src/SanitizationTest.php index ae1fa87..17eaae5 100644 --- a/tests/src/SanitizationTest.php +++ b/tests/src/SanitizationTest.php @@ -37,7 +37,7 @@ public function testSensitization($name, array $setters, array $getters) $actual = $poetry->get('component.'.$name)->fromXml($xml); // If XML is not valid test will fail here. - $xml = new \SimpleXMLElement($xml); + new \SimpleXMLElement($xml); foreach ($getters as $getter => $value) { expect($actual->$getter($value))->to->equal($value); } diff --git a/tests/src/fixtures/sanitization.yml b/tests/src/fixtures/sanitization.yml index 8018d78..dd93cd6 100644 --- a/tests/src/fixtures/sanitization.yml +++ b/tests/src/fixtures/sanitization.yml @@ -1,37 +1,113 @@ -- component: details +#- component: details +# setters: +# setClientId: "" +# setResponsible: "" +# setApplicationId: "application .>? Id" +# setAuthor: "DIGIT \ <> " +# setRequester: "DGCOMM \\<>" +# setTitle: "Title > <" +# setRemark: "Remark!!{}" +# setType: "INTER*^%(#" +# setDestination: "AUTRE{}<[[]]" +# setProcedure: "NEANT" +# setDelay: "11/12/\\2007" +# setRequestDate: "11\/12/2007" +# setStatus: "Ready!><" +# setInterServices: "" +# setReferenceFilesRemark: "<<>>" +# setWorkflowCode: "!!STS" +# getters: +# getClientId: "" +# getResponsible: "" +# getApplicationId: "application .>? Id" +# getAuthor: "DIGIT \ <> " +# getRequester: "DGCOMM \\<>" +# getTitle: "Title > <" +# getRemark: "Remark!!{}" +# getType: "INTER*^%(#" +# getDestination: "AUTRE{}<[[]]" +# getProcedure: "NEANT" +# getDelay: "11/12/\\2007" +# getRequestDate: "11\/12/2007" +# getStatus: "Ready!><" +# getInterServices: "" +# getReferenceFilesRemark: "<<>>" +# getWorkflowCode: "!!STS" +# +#- component: contact +# setters: +# setType: '' +# setAction: '' +# setNickname: '<.> *&^%$#@!' +# setEmail: 'info@example.org' +# getters: +# getType: '' +# getAction: '' +# getNickname: '<.> *&^%$#@!' +# getEmail: 'info@example.org' +# +#- component: reference_document +# setters: +# setLanguage: '< !@#$%^&*()_"''+ >' +# setFormat: '< !@#$%^&*()_+ >' +# setType: '< !@#$%^&*()_+ >' +# setAction: '< !@#$%^&*()_+ >' +# setName: '' +# setPath: '<.> *&^%$#@!' +# setSize: '123Mb<>' +# setFile: '' +# getters: +# getLanguage: '< !@#$%^&*()_"''+ >' +# getFormat: '< !@#$%^&*()_+ >' +# getType: '< !@#$%^&*()_+ >' +# getAction: '< !@#$%^&*()_+ >' +# getName: '' +# getPath: '<.> *&^%$#@!' +# getSize: '123Mb<>' +# getFile: '' +# +#- component: return_address +# setters: +# setType: "<'\"!@#$>" +# setAction: "<'\"!@#$>" +# setUser: "<'\"!@#$>" +# setPassword: "<'\"!@#$>" +# setAddress: "<'\"!@#$>" +# setPath: "<'\"!@#$>" +# setRemark: "<'\"!@#$>" +# getters: +# getType: "<'\"!@#$>" +# getAction: "<'\"!@#$>" +# getUser: "<'\"!@#$>" +# getPassword: "<'\"!@#$>" +# getAddress: "<'\"!@#$>" +# getPath: "<'\"!@#$>" +# getRemark: "<'\"!@#$>" + +- component: source setters: - setClientId: "" - setResponsible: "" - setApplicationId: "applicationId" - setAuthor: "DIGIT \ <> " - setRequester: "DGCOMM \\<>" - setTitle: "Title > <" - setRemark: "Remark!!{}" - setType: "INTER*^%(#" - setDestination: "AUTRE{}<[[]]" - setProcedure: "NEANT" - setDelay: "11/12/\\2007" - setRequestDate: "11\/12/2007" - setStatus: "Ready!><" - setInterServices: "" - setReferenceFilesRemark: "<<>>" - setWorkflowCode: "!!STS" + setChannel: '' + setDeadline: '' + setDeadlineStatus: '' + setConfidential: '' + setFormat: '' + setLegiswriteFormat: '' + setTrackChanges: '' + setName: '' + setFile: '' + setPath: '' + setSize: '' getters: - getClientId: "" - getResponsible: "" - getApplicationId: "applicationId" - getAuthor: "DIGIT \ <> " - getRequester: "DGCOMM \\<>" - getTitle: "Title > <" - getRemark: "Remark!!{}" - getType: "INTER*^%(#" - getDestination: "AUTRE{}<[[]]" - getProcedure: "NEANT" - getDelay: "11/12/\\2007" - getRequestDate: "11\/12/2007" - getStatus: "Ready!><" - getInterServices: "" - getReferenceFilesRemark: "<<>>" - getWorkflowCode: "!!STS" + getChannel: '' + getDeadline: '' + getDeadlineStatus: '' + getConfidential: '' + getFormat: '' + getLegiswriteFormat: '' + getTrackChanges: '' + getName: '' + getFile: '' + getPath: '' + getSize: ''