diff --git a/composer.lock b/composer.lock
index 02be38d..12e5045 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,7 +1,7 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a412b63f3bf61810f45e27e6792c5e4c",
@@ -103,18 +103,67 @@
"abandoned": "guzzlehttp/guzzle",
"time": "2015-03-18T18:23:50+00:00"
},
+ {
+ "name": "psr/container",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "time": "2017-02-14T16:28:37+00:00"
+ },
{
"name": "psr/log",
- "version": "1.0.2",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
+ "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"shasum": ""
},
"require": {
@@ -148,32 +197,35 @@
"psr",
"psr-3"
],
- "time": "2016-10-10T12:19:37+00:00"
+ "time": "2018-11-20T15:27:04+00:00"
},
{
"name": "satooshi/php-coveralls",
- "version": "v1.0.1",
+ "version": "v1.1.0",
"source": {
"type": "git",
- "url": "https://github.com/satooshi/php-coveralls.git",
- "reference": "da51d304fe8622bf9a6da39a8446e7afd432115c"
+ "url": "https://github.com/php-coveralls/php-coveralls.git",
+ "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/da51d304fe8622bf9a6da39a8446e7afd432115c",
- "reference": "da51d304fe8622bf9a6da39a8446e7afd432115c",
+ "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad",
+ "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-simplexml": "*",
- "guzzle/guzzle": "^2.8|^3.0",
- "php": ">=5.3.3",
+ "guzzle/guzzle": "^2.8 || ^3.0",
+ "php": "^5.3.3 || ^7.0",
"psr/log": "^1.0",
- "symfony/config": "^2.1|^3.0",
- "symfony/console": "^2.1|^3.0",
- "symfony/stopwatch": "^2.0|^3.0",
- "symfony/yaml": "^2.0|^3.0"
+ "symfony/config": "^2.1 || ^3.0 || ^4.0",
+ "symfony/console": "^2.1 || ^3.0 || ^4.0",
+ "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0",
+ "symfony/yaml": "^2.0 || ^3.0 || ^4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0"
},
"suggest": {
"symfony/http-kernel": "Allows Symfony integration"
@@ -199,35 +251,44 @@
}
],
"description": "PHP client library for Coveralls API",
- "homepage": "https://github.com/satooshi/php-coveralls",
+ "homepage": "https://github.com/php-coveralls/php-coveralls",
"keywords": [
"ci",
"coverage",
"github",
"test"
],
- "time": "2016-01-20T17:35:46+00:00"
+ "abandoned": "php-coveralls/php-coveralls",
+ "time": "2017-12-06T23:17:56+00:00"
},
{
"name": "symfony/config",
- "version": "v3.2.7",
+ "version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "8444bde28e3c2a33e571e6f180c2d78bfdc4480d"
+ "reference": "0acb26407a9e1a64a275142f0ae5e36436342720"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/8444bde28e3c2a33e571e6f180c2d78bfdc4480d",
- "reference": "8444bde28e3c2a33e571e6f180c2d78bfdc4480d",
+ "url": "https://api.github.com/repos/symfony/config/zipball/0acb26407a9e1a64a275142f0ae5e36436342720",
+ "reference": "0acb26407a9e1a64a275142f0ae5e36436342720",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "symfony/filesystem": "~2.8|~3.0"
+ "php": "^7.1.3",
+ "symfony/filesystem": "~3.4|~4.0",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "conflict": {
+ "symfony/finder": "<3.4"
},
"require-dev": {
- "symfony/yaml": "~3.0"
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/event-dispatcher": "~3.4|~4.0",
+ "symfony/finder": "~3.4|~4.0",
+ "symfony/messenger": "~4.1",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
@@ -235,7 +296,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "4.3-dev"
}
},
"autoload": {
@@ -262,43 +323,52 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2017-04-04T15:30:56+00:00"
+ "time": "2019-09-19T15:51:53+00:00"
},
{
"name": "symfony/console",
- "version": "v3.2.7",
+ "version": "v4.2.11",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "c30243cc51f726812be3551316b109a2f5deaf8d"
+ "reference": "fc2e274aade6567a750551942094b2145ade9b6c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/c30243cc51f726812be3551316b109a2f5deaf8d",
- "reference": "c30243cc51f726812be3551316b109a2f5deaf8d",
+ "url": "https://api.github.com/repos/symfony/console/zipball/fc2e274aade6567a750551942094b2145ade9b6c",
+ "reference": "fc2e274aade6567a750551942094b2145ade9b6c",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "symfony/debug": "~2.8|~3.0",
+ "php": "^7.1.3",
+ "symfony/contracts": "^1.0",
"symfony/polyfill-mbstring": "~1.0"
},
+ "conflict": {
+ "symfony/dependency-injection": "<3.4",
+ "symfony/process": "<3.3"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0"
+ },
"require-dev": {
"psr/log": "~1.0",
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/filesystem": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0"
+ "symfony/config": "~3.4|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/event-dispatcher": "~3.4|~4.0",
+ "symfony/lock": "~3.4|~4.0",
+ "symfony/process": "~3.4|~4.0"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
- "symfony/filesystem": "",
+ "symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "4.2-dev"
}
},
"autoload": {
@@ -325,45 +395,51 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-04-04T14:33:42+00:00"
+ "time": "2019-07-24T17:13:20+00:00"
},
{
- "name": "symfony/debug",
- "version": "v3.2.7",
+ "name": "symfony/contracts",
+ "version": "v1.1.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/debug.git",
- "reference": "56f613406446a4a0a031475cfd0a01751de22659"
+ "url": "https://github.com/symfony/contracts.git",
+ "reference": "d3636025e8253c6144358ec0a62773cae588395b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/56f613406446a4a0a031475cfd0a01751de22659",
- "reference": "56f613406446a4a0a031475cfd0a01751de22659",
+ "url": "https://api.github.com/repos/symfony/contracts/zipball/d3636025e8253c6144358ec0a62773cae588395b",
+ "reference": "d3636025e8253c6144358ec0a62773cae588395b",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "psr/log": "~1.0"
- },
- "conflict": {
- "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
+ "php": "^7.1.3"
},
"require-dev": {
- "symfony/class-loader": "~2.8|~3.0",
- "symfony/http-kernel": "~2.8|~3.0"
+ "psr/cache": "^1.0",
+ "psr/container": "^1.0",
+ "symfony/polyfill-intl-idn": "^1.10"
+ },
+ "suggest": {
+ "psr/cache": "When using the Cache contracts",
+ "psr/container": "When using the Service contracts",
+ "symfony/cache-contracts-implementation": "",
+ "symfony/event-dispatcher-implementation": "",
+ "symfony/http-client-contracts-implementation": "",
+ "symfony/service-contracts-implementation": "",
+ "symfony/translation-contracts-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "1.1-dev"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Component\\Debug\\": ""
+ "Symfony\\Contracts\\": ""
},
"exclude-from-classmap": [
- "/Tests/"
+ "**/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -372,30 +448,38 @@
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony Debug Component",
+ "description": "A set of abstractions extracted out of the Symfony components",
"homepage": "https://symfony.com",
- "time": "2017-03-28T21:38:24+00:00"
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "time": "2019-04-27T14:29:50+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.19",
+ "version": "v2.8.50",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "88b65f0ac25355090e524aba4ceb066025df8bd2"
+ "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/88b65f0ac25355090e524aba4ceb066025df8bd2",
- "reference": "88b65f0ac25355090e524aba4ceb066025df8bd2",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0",
+ "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0",
"shasum": ""
},
"require": {
@@ -442,29 +526,30 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2017-04-03T20:37:06+00:00"
+ "time": "2018-11-21T14:20:20+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v3.2.7",
+ "version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "64421e6479c4a8e60d790fb666bd520992861b66"
+ "reference": "9abbb7ef96a51f4d7e69627bc6f63307994e4263"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/64421e6479c4a8e60d790fb666bd520992861b66",
- "reference": "64421e6479c4a8e60d790fb666bd520992861b66",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/9abbb7ef96a51f4d7e69627bc6f63307994e4263",
+ "reference": "9abbb7ef96a51f4d7e69627bc6f63307994e4263",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^7.1.3",
+ "symfony/polyfill-ctype": "~1.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "4.3-dev"
}
},
"autoload": {
@@ -491,20 +576,78 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2017-03-26T15:47:15+00:00"
+ "time": "2019-08-20T14:07:54+00:00"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "v1.12.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.12-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.3.0",
+ "version": "v1.12.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
+ "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
- "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17",
+ "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17",
"shasum": ""
},
"require": {
@@ -516,7 +659,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.12-dev"
}
},
"autoload": {
@@ -550,29 +693,88 @@
"portable",
"shim"
],
- "time": "2016-11-14T01:06:16+00:00"
+ "time": "2019-08-06T08:03:45+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "v1.1.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "ffcde9615dc5bb4825b9f6aed07716f1f57faae0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ffcde9615dc5bb4825b9f6aed07716f1f57faae0",
+ "reference": "ffcde9615dc5bb4825b9f6aed07716f1f57faae0",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1.3",
+ "psr/container": "^1.0"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "time": "2019-09-17T11:12:18+00:00"
},
{
"name": "symfony/stopwatch",
- "version": "v3.2.7",
+ "version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
- "reference": "c5ee0f8650c84b4d36a5f76b3b504233feaabf75"
+ "reference": "1e4ff456bd625be5032fac9be4294e60442e9b71"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/c5ee0f8650c84b4d36a5f76b3b504233feaabf75",
- "reference": "c5ee0f8650c84b4d36a5f76b3b504233feaabf75",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/1e4ff456bd625be5032fac9be4294e60442e9b71",
+ "reference": "1e4ff456bd625be5032fac9be4294e60442e9b71",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^7.1.3",
+ "symfony/service-contracts": "^1.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "4.3-dev"
}
},
"autoload": {
@@ -599,27 +801,31 @@
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
- "time": "2017-02-18T17:28:00+00:00"
+ "time": "2019-08-07T11:52:19+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.2.7",
+ "version": "v4.3.5",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621"
+ "reference": "41e16350a2a1c7383c4735aa2f9fce74cf3d1178"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/62b4cdb99d52cb1ff253c465eb1532a80cebb621",
- "reference": "62b4cdb99d52cb1ff253c465eb1532a80cebb621",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/41e16350a2a1c7383c4735aa2f9fce74cf3d1178",
+ "reference": "41e16350a2a1c7383c4735aa2f9fce74cf3d1178",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^7.1.3",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "conflict": {
+ "symfony/console": "<3.4"
},
"require-dev": {
- "symfony/console": "~2.8|~3.0"
+ "symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
@@ -627,7 +833,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-master": "4.3-dev"
}
},
"autoload": {
@@ -654,7 +860,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-03-20T09:45:15+00:00"
+ "time": "2019-09-11T15:41:19+00:00"
}
],
"aliases": [],
diff --git a/examples/Extension/NASK/_autoload.php b/examples/Extension/NASK/_autoload.php
new file mode 100644
index 0000000..09b258b
--- /dev/null
+++ b/examples/Extension/NASK/_autoload.php
@@ -0,0 +1,3 @@
+addFuture('ala.pl');
+$frame->addFuture('ela.com.pl');
+$frame->addFuture('ola.org');
+
+echo $frame;
diff --git a/examples/Extension/NASK/create_future.php b/examples/Extension/NASK/create_future.php
new file mode 100644
index 0000000..50cd9d4
--- /dev/null
+++ b/examples/Extension/NASK/create_future.php
@@ -0,0 +1,20 @@
+setFuture('example.pl');
+$frame->setPeriod('3y');
+$frame->setRegistrant('jd1234');
+$frame->setAuthInfo('2fooBAR');
+echo $frame;
diff --git a/examples/Extension/NASK/delete_future.php b/examples/Extension/NASK/delete_future.php
new file mode 100644
index 0000000..0f162bb
--- /dev/null
+++ b/examples/Extension/NASK/delete_future.php
@@ -0,0 +1,17 @@
+setFuture('futuretest.pl');
+echo $frame;
diff --git a/examples/Extension/NASK/info_future.php b/examples/Extension/NASK/info_future.php
new file mode 100644
index 0000000..82ea582
--- /dev/null
+++ b/examples/Extension/NASK/info_future.php
@@ -0,0 +1,18 @@
+setFuture('example.pl');
+$frame->setAuthInfo('2fooBAR');
+echo $frame;
diff --git a/examples/Extension/NASK/renew_future.php b/examples/Extension/NASK/renew_future.php
new file mode 100644
index 0000000..0927773
--- /dev/null
+++ b/examples/Extension/NASK/renew_future.php
@@ -0,0 +1,19 @@
+setFuture('example.pl');
+$frame->setCurrentExpirationDate('2010-10-30');
+$frame->setPeriod('3y');
+echo $frame;
diff --git a/examples/Extension/NASK/report_basic.php b/examples/Extension/NASK/report_basic.php
new file mode 100644
index 0000000..6166a1e
--- /dev/null
+++ b/examples/Extension/NASK/report_basic.php
@@ -0,0 +1,18 @@
+setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/report_cancel.php b/examples/Extension/NASK/report_cancel.php
new file mode 100644
index 0000000..5e8767d
--- /dev/null
+++ b/examples/Extension/NASK/report_cancel.php
@@ -0,0 +1,19 @@
+setReportId('e264a95d-0ba0-40f1-a0e0-97407fd5cdbe');
+$frame->setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/report_contact.php b/examples/Extension/NASK/report_contact.php
new file mode 100644
index 0000000..df52804
--- /dev/null
+++ b/examples/Extension/NASK/report_contact.php
@@ -0,0 +1,19 @@
+setContactId('k13');
+$frame->setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/report_domain.php b/examples/Extension/NASK/report_domain.php
new file mode 100644
index 0000000..778d309
--- /dev/null
+++ b/examples/Extension/NASK/report_domain.php
@@ -0,0 +1,23 @@
+setState('STATE_REGISTERED');
+$frame->setExDate('2007-05-07T11:23:00.0Z');
+$frame->addStatus('serverHold');
+$frame->setStatusesIn(true);
+$frame->addStatus('clientHold');
+$frame->setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/report_future.php b/examples/Extension/NASK/report_future.php
new file mode 100644
index 0000000..d41fb81
--- /dev/null
+++ b/examples/Extension/NASK/report_future.php
@@ -0,0 +1,19 @@
+setExDate('2007-04-23T15:22:34.0Z');
+$frame->setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/report_getdata.php b/examples/Extension/NASK/report_getdata.php
new file mode 100644
index 0000000..60fb046
--- /dev/null
+++ b/examples/Extension/NASK/report_getdata.php
@@ -0,0 +1,19 @@
+setReportId('58ab3bd1-fcce-4c03-b159-8af5f1adb447');
+$frame->setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/report_host.php b/examples/Extension/NASK/report_host.php
new file mode 100644
index 0000000..6fbebe9
--- /dev/null
+++ b/examples/Extension/NASK/report_host.php
@@ -0,0 +1,19 @@
+setName('ns1.temp.pl');
+$frame->setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/report_prepaid_paymentfunds.php b/examples/Extension/NASK/report_prepaid_paymentfunds.php
new file mode 100644
index 0000000..825010d
--- /dev/null
+++ b/examples/Extension/NASK/report_prepaid_paymentfunds.php
@@ -0,0 +1,19 @@
+setFundsAccountType('DOMAIN');
+$frame->setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/report_prepaid_payments.php b/examples/Extension/NASK/report_prepaid_payments.php
new file mode 100644
index 0000000..28aeef6
--- /dev/null
+++ b/examples/Extension/NASK/report_prepaid_payments.php
@@ -0,0 +1,19 @@
+setPaymentsAccountType('DOMAIN');
+$frame->setOffset(0);
+$frame->setLimit(50);
+echo $frame;
diff --git a/examples/Extension/NASK/transfer_future.php b/examples/Extension/NASK/transfer_future.php
new file mode 100644
index 0000000..d473293
--- /dev/null
+++ b/examples/Extension/NASK/transfer_future.php
@@ -0,0 +1,19 @@
+setOperation('request');
+$frame->setFuture('example.pl');
+$frame->setAuthInfo('2fooBAR');
+echo $frame;
diff --git a/examples/Extension/NASK/transfer_future_resend.php b/examples/Extension/NASK/transfer_future_resend.php
new file mode 100644
index 0000000..8a603e6
--- /dev/null
+++ b/examples/Extension/NASK/transfer_future_resend.php
@@ -0,0 +1,20 @@
+setOperation('request');
+$frame->setFuture('example.pl');
+$frame->setAuthInfo('2fooBAR');
+$frame->resendConfirmationRequest();
+echo $frame;
diff --git a/examples/Extension/NASK/update_future.php b/examples/Extension/NASK/update_future.php
new file mode 100644
index 0000000..92a4697
--- /dev/null
+++ b/examples/Extension/NASK/update_future.php
@@ -0,0 +1,19 @@
+setFuture('example7.pl');
+$frame->changeRegistrant('mak21');
+$frame->changeAuthInfo('2fooBAR');
+echo $frame;
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 4529596..42d7df0 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -12,6 +12,8 @@
./tests
+ ./tests
+ ./tests
diff --git a/src/AfriCC/EPP/AbstractFrame.php b/src/AfriCC/EPP/AbstractFrame.php
index 8f0897b..855bd8e 100644
--- a/src/AfriCC/EPP/AbstractFrame.php
+++ b/src/AfriCC/EPP/AbstractFrame.php
@@ -22,11 +22,18 @@
abstract class AbstractFrame extends DOMDocument implements FrameInterface
{
protected $xpath;
+ /**
+ * @var \DOMElement[]
+ */
protected $nodes;
protected $format;
protected $command;
protected $mapping;
protected $extension;
+ /**
+ * @var bool whether to ignore command part when building realxpath
+ */
+ protected $ignore_command = false;
/**
* Construct (with import if specified) frame
@@ -152,6 +159,7 @@ protected function createNodes($path)
++$next_key;
$path_parts[$i] = sprintf('%s:%s[%d]', $node_ns, $node_name, $next_key);
}
+
if (preg_match('/^(.*)\[(\d+)\]$/', $node_name, $matches)) {
// direct node-array access
$node_name = $matches[1];
@@ -220,7 +228,7 @@ protected function realxpath($path)
array_unshift($path_parts, $this->mapping . ':' . $this->command);
}
- if (!empty($this->command)) {
+ if (!empty($this->command) && !$this->ignore_command) {
array_unshift($path_parts, 'epp:' . $this->command);
}
diff --git a/src/AfriCC/EPP/Extension.php b/src/AfriCC/EPP/Extension.php
new file mode 100644
index 0000000..df2ac2e
--- /dev/null
+++ b/src/AfriCC/EPP/Extension.php
@@ -0,0 +1,7 @@
+set('future:name[]', $domain);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Create/Contact.php b/src/AfriCC/EPP/Extension/NASK/Create/Contact.php
new file mode 100644
index 0000000..06b0076
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Create/Contact.php
@@ -0,0 +1,44 @@
+extension_xmlns;
+ }
+
+ /**
+ * Set entity type of contact
+ *
+ * @param bool $individual True if person, false if company
+ */
+ public function setIndividual($individual = false)
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extcon:create/extcon:individual', $individual ? 1 : 0);
+ }
+
+ /**
+ * Set consent for publishing
+ *
+ * Don't use
+ *
+ * Ignored since 6.1.19
+ * Up until 6.1.19 this HAD to be true if Individual was to be False
+ *
+ * @deprecated Since NASK registry 6.1.19, removed in registry 6.2.1
+ *
+ * @param bool $consent
+ */
+ public function setConsentForPublishing($consent = false)
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extcon:create/extcon:consentForPublishing', $consent ? 1 : 0);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Create/Domain.php b/src/AfriCC/EPP/Extension/NASK/Create/Domain.php
new file mode 100644
index 0000000..35f7856
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Create/Domain.php
@@ -0,0 +1,53 @@
+extension_xmlns;
+ }
+
+ public function setBook()
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extdom:create/extdom:book');
+ }
+
+ public function addNs($host)
+ {
+ if (!Validator::isHostname($host)) {
+ throw new \Exception(sprintf('%s is not a valid host name', $host));
+ }
+
+ $this->set('domain:ns[]', $host);
+ }
+
+ public function addHostObj($host)
+ {
+ return $this->addNs($host);
+ }
+
+ public function setAdminContact($admin_contact)
+ {
+ return false; //TODO: should this throw if registry doesn't allow Admin contact?
+ }
+
+ public function setTechContact($tech_contact)
+ {
+ return false; //TODO: should this throw if registry doesn't allow Tech contact?
+ }
+
+ public function setBillingContact($billing_contact)
+ {
+ return false; //TODO: should this throw if registry doesn't allow Billing contact?
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Create/Future.php b/src/AfriCC/EPP/Extension/NASK/Create/Future.php
new file mode 100644
index 0000000..cc1cf8d
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Create/Future.php
@@ -0,0 +1,70 @@
+set('future:name', $domain);
+ }
+
+ /**
+ * Set future period
+ *
+ * Set period for which to create Future. Usually that will be 3y
+ *
+ * @param string $period Period ending with with y or m
+ */
+ public function setPeriod($period)
+ {
+ $this->appendPeriod('future:period[@unit=\'%s\']', $period);
+ }
+
+ /**
+ * Set future registrant
+ *
+ * @param string $registrant registrant ContactID
+ */
+ public function setRegistrant($registrant)
+ {
+ $this->set('future:registrant', $registrant);
+ }
+
+ /**
+ * Set future AuthInfo, generate if passed null
+ *
+ * @param string $pw AuthInfo code
+ *
+ * @return string AuthInfo code
+ */
+ public function setAuthInfo($pw = null)
+ {
+ if ($pw === null) {
+ $pw = Random::auth(12);
+ }
+
+ $this->set('future:authInfo/future:pw', $pw);
+
+ return $pw;
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Delete/Future.php b/src/AfriCC/EPP/Extension/NASK/Delete/Future.php
new file mode 100644
index 0000000..c665140
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Delete/Future.php
@@ -0,0 +1,26 @@
+set('future:name', $domain);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Info/Contact.php b/src/AfriCC/EPP/Extension/NASK/Info/Contact.php
new file mode 100644
index 0000000..fafbf14
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Info/Contact.php
@@ -0,0 +1,32 @@
+extension_xmlns;
+ }
+
+ /**
+ * Set contact authinfo
+ *
+ * @param string $pw authinfo
+ * @param string $roid If specified, authinfo is of domain whose registrant is this contact
+ */
+ public function setAuthInfo($pw, $roid = null)
+ {
+ $node = $this->set('//epp:epp/epp:command/epp:extension/extcon:info/extcon:authInfo/extcon:pw', $pw);
+
+ if ($roid !== null) {
+ $node->setAttribute('roid', $roid);
+ }
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Info/Future.php b/src/AfriCC/EPP/Extension/NASK/Info/Future.php
new file mode 100644
index 0000000..f142576
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Info/Future.php
@@ -0,0 +1,41 @@
+set('future:name', $domain);
+ }
+
+ /**
+ * Set requested future AuthInfo
+ *
+ * @param string $pw AuthInfo for future
+ * @param string $roid if specified, this is ContactId of registrant and autinfo is of registrant
+ */
+ public function setAuthInfo($pw, $roid = null)
+ {
+ $node = $this->set('future:authInfo/future:pw', $pw);
+
+ if ($roid !== null) {
+ $node->setAttribute('roid', $roid);
+ }
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/ObjectSpec.php b/src/AfriCC/EPP/Extension/NASK/ObjectSpec.php
new file mode 100644
index 0000000..77ddc68
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/ObjectSpec.php
@@ -0,0 +1,58 @@
+ [
+ 'xmlns' => 'http://www.dns.pl/nask-epp-schema/epp-2.0',
+ ],
+ 'domain' => [
+ 'xmlns' => 'http://www.dns.pl/nask-epp-schema/domain-2.0',
+ ],
+ 'host' => [
+ 'xmlns' => 'http://www.dns.pl/nask-epp-schema/host-2.0',
+ ],
+ 'contact' => [
+ 'xmlns' => 'http://www.dns.pl/nask-epp-schema/contact-2.0',
+ ],
+ 'future' => [
+ 'xmlns' => 'http://www.dns.pl/nask-epp-schema/future-2.0',
+ ],
+ 'secDNS' => [
+ 'xmlns' => 'http://www.dns.pl/nask-epp-schema/secDNS-2.0',
+ ],
+
+ ];
+
+ public static $services = [
+ 'http://www.dns.pl/nask-epp-schema/contact-2.0',
+ 'http://www.dns.pl/nask-epp-schema/host-2.0',
+ 'http://www.dns.pl/nask-epp-schema/domain-2.0',
+ 'http://www.dns.pl/nask-epp-schema/future-2.0',
+ ];
+
+ public static $serviceExtensions = [
+ 'http://www.dns.pl/nask-epp-schema/extcon-2.0',
+ 'http://www.dns.pl/nask-epp-schema/extdom-2.0',
+ 'http://www.dns.pl/nask-epp-schema/secDNS-2.0',
+ ];
+
+ private static $backup;
+
+ public static function overwriteParent()
+ {
+ self::$backup = MainObjectSpec::$specs;
+ MainObjectSpec::$specs = self::$specs;
+ }
+
+ public static function restoreParent()
+ {
+ if (!empty(self::$backup)) {
+ MainObjectSpec::$specs = self::$backup;
+ }
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Renew/Domain.php b/src/AfriCC/EPP/Extension/NASK/Renew/Domain.php
new file mode 100644
index 0000000..6f6362b
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Renew/Domain.php
@@ -0,0 +1,28 @@
+extension_xmlns;
+ }
+
+ public function setReactivate()
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extdom:renew/extdom:reactivate');
+ }
+
+ public function setRenewToDate($date)
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extdom:renew/extdom:renewToDate', $date);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Renew/Future.php b/src/AfriCC/EPP/Extension/NASK/Renew/Future.php
new file mode 100644
index 0000000..9765015
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Renew/Future.php
@@ -0,0 +1,51 @@
+set('future:name', $domain);
+ }
+
+ /**
+ * Set current expiration date of future object
+ *
+ * @param string $curExpDate date in yyyy-mm-dd format
+ */
+ public function setCurrentExpirationDate($curExpDate)
+ {
+ $this->set('future:curExpDate', $curExpDate);
+ }
+
+ /**
+ * Set renew period for future object
+ *
+ * Usually this should be 3y.
+ *
+ * @param string $period ending in y (for years) or m (for months)
+ */
+ public function setPeriod($period)
+ {
+ $this->appendPeriod('future:period[@unit=\'%s\']', $period);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Report.php b/src/AfriCC/EPP/Extension/NASK/Report.php
new file mode 100644
index 0000000..6e70f8a
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Report.php
@@ -0,0 +1,30 @@
+extension_xmlns;
+ }
+
+ public function setOffset($offset)
+ {
+ $this->set('extreport:offset', $offset);
+ }
+
+ public function setLimit($limit)
+ {
+ $this->set('extreport:limit', $limit);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Report/Cancel.php b/src/AfriCC/EPP/Extension/NASK/Report/Cancel.php
new file mode 100644
index 0000000..eb39283
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Report/Cancel.php
@@ -0,0 +1,18 @@
+set('extreport:cancel/extreport:extreportId', $reportId);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Report/Contact.php b/src/AfriCC/EPP/Extension/NASK/Report/Contact.php
new file mode 100644
index 0000000..f1d27de
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Report/Contact.php
@@ -0,0 +1,29 @@
+set('extreport:contact');
+ }
+
+ /**
+ * Set ID of contact to generate report about
+ *
+ * Do not use this function if intended report is to be about all contact objects.
+ *
+ * @param string $contact ContactID of contact object to generate report about.
+ */
+ public function setContactId($contact)
+ {
+ $this->set('extreport:contact/extreport:conId', $contact);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Report/Domain.php b/src/AfriCC/EPP/Extension/NASK/Report/Domain.php
new file mode 100644
index 0000000..3af1e0e
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Report/Domain.php
@@ -0,0 +1,84 @@
+set('extreport:domain');
+ }
+
+ /**
+ * Set Domains state to report about
+ *
+ * Acceptable states are:
+ *
+ * - STATE_REGISTERED
+ * - STATE_EXPIRED
+ * - STATE_BLOCKED
+ * - STATE_RESERVED
+ * - STATE_BOOK_BLOCKED
+ * - STATE_DELETE_BLOCKED
+ *
+ *
+ * If not set default is assumed STATE_REGISTERED
+ *
+ * @param string $state
+ */
+ public function setState($state)
+ {
+ $this->set('extreport:domain/extreport:state', $state);
+ }
+
+ /**
+ * Set expiry date of domain state.
+ *
+ * Do not use this if intended report is to be about all domains.
+ *
+ * @param string $date in proper format
+ */
+ public function setExDate($date)
+ {
+ $this->set('extreport:domain/extreport:exDate', $date);
+ }
+
+ /**
+ * Add domain status to list of statuses of domains to include in report
+ *
+ * Depending on value of statusesIn, domains in report will either have or not have specified statuses.
+ *
+ * @see Domain::setStatusesIn()
+ *
+ * @param string $status domain status
+ */
+ public function addStatus($status)
+ {
+ $this->set('extreport:domain/extreport:statuses/extreport:status[]', $status);
+ }
+
+ /**
+ * Set statutesIn attribute of statuses select.
+ *
+ * If set to true, report will include domains having specified statuses.
+ * Otherwise report will include domains not having specified statuses.
+ *
+ * By default registrar assumes true for statusesIn
+ *
+ * @see Domain::addStatus();
+ *
+ * @param bool $statusesIn
+ */
+ public function setStatusesIn($statusesIn = true)
+ {
+ $node = $this->set('extreport:domain/extreport:statuses');
+
+ $node->setAttribute('statusesIn', ($statusesIn) ? 'true' : 'false');
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Report/Future.php b/src/AfriCC/EPP/Extension/NASK/Report/Future.php
new file mode 100644
index 0000000..0b00d6a
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Report/Future.php
@@ -0,0 +1,29 @@
+set('extreport:future');
+ }
+
+ /**
+ * Set expiry date of Future elements to report about
+ *
+ * Do not use this function if intended report is to be about all Future objects.
+ *
+ * @param string $exDate Expiry date of future in proper format
+ */
+ public function setExDate($exDate)
+ {
+ $this->set('extreport:future/extreport:exDate', $exDate);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Report/GetData.php b/src/AfriCC/EPP/Extension/NASK/Report/GetData.php
new file mode 100644
index 0000000..0100e91
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Report/GetData.php
@@ -0,0 +1,18 @@
+set('extreport:getData/extreport:extreportId', $reportId);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Report/Host.php b/src/AfriCC/EPP/Extension/NASK/Report/Host.php
new file mode 100644
index 0000000..2795e5f
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Report/Host.php
@@ -0,0 +1,27 @@
+set('extreport:host');
+ }
+
+ /**
+ * Set name of host to report. Do not use unless wanting report only about single host.
+ *
+ * @param string $name name of host to report
+ */
+ public function setName($name)
+ {
+ $this->set('extreport:host/extreport:name', $name);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Report/Prepaid.php b/src/AfriCC/EPP/Extension/NASK/Report/Prepaid.php
new file mode 100644
index 0000000..dbe5b59
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Report/Prepaid.php
@@ -0,0 +1,80 @@
+
+ * DOMAIN
+ * ENUM
+ *
+ *
+ * @see Prepaid::setFundsAccountType()
+ *
+ * @uses Prepaid::isAccountType()
+ *
+ * @param string $accountType
+ *
+ * @throws \Exception On wrong account type
+ */
+ public function setPaymentsAccountType($accountType)
+ {
+ if (!$this->isAccountType($accountType)) {
+ throw new \Exception(sprintf('"%s" is not valid Account Type!', $accountType));
+ }
+ $this->set('extreport:prepaid/extreport:payment/extreport:accountType', $accountType);
+ }
+
+ /**
+ * Set account type in conjunction with payments report.
+ *
+ * Use either this or setPaymentsAccountType. Never combine them in single frame.
+ *
+ * Acceptable accountType:
+ *
+ *
+ * @see Prepaid::setPaymentsAccountType()
+ *
+ * @uses Prepaid::isAccountType()
+ *
+ * @param string $accountType
+ *
+ * @throws \Exception On wrong account type
+ */
+ public function setFundsAccountType($accountType)
+ {
+ if (!$this->isAccountType($accountType)) {
+ throw new \Exception(sprintf('"%s" is not valid Account Type!', $accountType));
+ }
+ $this->set('extreport:prepaid/extreport:paymentFunds/extreport:accountType', $accountType);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Transfer/Domain.php b/src/AfriCC/EPP/Extension/NASK/Transfer/Domain.php
new file mode 100644
index 0000000..98e950f
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Transfer/Domain.php
@@ -0,0 +1,27 @@
+extension_xmlns;
+ }
+
+ /**
+ * Add resend confirmation request
+ *
+ * This element can only be applied on request frame with no period specified
+ */
+ public function resendConfirmationRequest()
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extdom:transfer/extdom:resendConfirmationRequest');
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Transfer/Future.php b/src/AfriCC/EPP/Extension/NASK/Transfer/Future.php
new file mode 100644
index 0000000..9a6cf1c
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Transfer/Future.php
@@ -0,0 +1,56 @@
+extension_xmlns;
+ }
+
+ /**
+ * Set domain name for future (option)
+ *
+ * @param string $domain Domain Name
+ *
+ * @throws Exception on incorrect domain name
+ */
+ public function setFuture($domain)
+ {
+ if (!Validator::isHostname($domain)) {
+ throw new Exception(sprintf('%s is not a valid domain name', $domain));
+ }
+
+ $this->set('future:name', $domain);
+ }
+
+ /**
+ * Set requested future AuthInfo
+ *
+ * @param string $pw AuthInfo for future
+ * @param string $roid if specified, this is ContactId of registrant and autinfo is of registrant
+ */
+ public function setAuthInfo($pw, $roid = null)
+ {
+ $node = $this->set('future:authInfo/future:pw', $pw);
+
+ if ($roid !== null) {
+ $node->setAttribute('roid', $roid);
+ }
+ }
+
+ public function resendConfirmationRequest()
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extfut:transfer/extfut:resendConfirmationRequest');
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Update/Contact.php b/src/AfriCC/EPP/Extension/NASK/Update/Contact.php
new file mode 100644
index 0000000..663d6b5
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Update/Contact.php
@@ -0,0 +1,44 @@
+extension_xmlns;
+ }
+
+ /**
+ * Set entity type of contact
+ *
+ * @param bool $individual True if person, false if company
+ */
+ public function setIndividual($individual = false)
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extcon:update/extcon:individual', $individual ? 1 : 0);
+ }
+
+ /**
+ * Set consent for publishing
+ *
+ * Don't use
+ *
+ * Ignored since 6.1.19
+ * Up until 6.1.19 this HAD to be true if Individual was to be False
+ *
+ * @deprecated Since NASK registry 6.1.19, removed in registry 6.2.1
+ *
+ * @param bool $consent
+ */
+ public function setConsentForPublishing($consent = false)
+ {
+ $this->set('//epp:epp/epp:command/epp:extension/extcon:update/extcon:consentForPublishing', $consent ? 1 : 0);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Update/Domain.php b/src/AfriCC/EPP/Extension/NASK/Update/Domain.php
new file mode 100644
index 0000000..0146985
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Update/Domain.php
@@ -0,0 +1,77 @@
+extension_xmlns;
+ }
+
+ public function addNs($host, $remove = false)
+ {
+ if (!Validator::isHostname($host)) {
+ throw new \Exception(sprintf('%s is not a valid host name', $host));
+ }
+
+ if ($remove) {
+ $key = 'rem';
+ } else {
+ $key = 'add';
+ }
+
+ $this->set(sprintf('domain:%s/domain:ns[]', $key), $host);
+ }
+
+ public function removeNs($host)
+ {
+ return $this->addNs($host, true);
+ }
+
+ public function addHostObj($host, $remove = false)
+ {
+ return $this->addNs($host, $remove);
+ }
+
+ public function addAdminContact($contact, $remove = false)
+ {
+ if ($remove) {
+ $key = 'rem';
+ } else {
+ return false; //TODO: should this thow if registry forbids adding Admin contact?
+ }
+
+ $this->set(sprintf('domain:%s/domain:contact[@type=\'admin\']', $key), $contact);
+ }
+
+ public function addTechContact($contact, $remove = false)
+ {
+ if ($remove) {
+ $key = 'rem';
+ } else {
+ return false; //TODO: shuld this throw if registry forbids adding Tech contact?
+ }
+
+ $this->set(sprintf('domain:%s/domain:contact[@type=\'tech\']', $key), $contact);
+ }
+
+ public function addBillingContact($contact, $remove = false)
+ {
+ if ($remove) {
+ $key = 'rem';
+ } else {
+ return false; //TODO: should this throw if registry forbids adding Billing contact
+ }
+
+ $this->set(sprintf('domain:%s/domain:contact[@type=\'billing\']', $key), $contact);
+ }
+}
diff --git a/src/AfriCC/EPP/Extension/NASK/Update/Future.php b/src/AfriCC/EPP/Extension/NASK/Update/Future.php
new file mode 100644
index 0000000..2757835
--- /dev/null
+++ b/src/AfriCC/EPP/Extension/NASK/Update/Future.php
@@ -0,0 +1,54 @@
+set('future:name', $domain);
+ }
+
+ /**
+ * Change registrant contact id of Future object
+ *
+ * @param string $registrant ContactID of registrant
+ */
+ public function changeRegistrant($registrant)
+ {
+ $this->set('future:chg/future:registrant', $registrant);
+ }
+
+ /**
+ * Change future AuthInfo, generate if passed null
+ *
+ * @param string $pw AuthInfo code
+ *
+ * @return string AuthInfo code
+ */
+ public function changeAuthInfo($pw = null)
+ {
+ if ($pw === null) {
+ $pw = Random::auth(12);
+ }
+
+ $this->set('future:chg/future:authInfo/future:pw', $pw);
+
+ return $pw;
+ }
+}
diff --git a/src/AfriCC/EPP/ObjectSpec.php b/src/AfriCC/EPP/ObjectSpec.php
index 79a6999..077604a 100644
--- a/src/AfriCC/EPP/ObjectSpec.php
+++ b/src/AfriCC/EPP/ObjectSpec.php
@@ -40,10 +40,10 @@ class ObjectSpec
public static function xmlns($object)
{
- if (!isset(self::$specs[$object]['xmlns'])) {
+ if (!isset(static::$specs[$object]['xmlns'])) {
return false;
}
- return self::$specs[$object]['xmlns'];
+ return static::$specs[$object]['xmlns'];
}
}
diff --git a/tests/EPP/Extension/NASK/Check/FutureCheckTest5x.php b/tests/EPP/Extension/NASK/Check/FutureCheckTest5x.php
new file mode 100644
index 0000000..91631a0
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Check/FutureCheckTest5x.php
@@ -0,0 +1,79 @@
+addFuture()
+ */
+ public function testAddFuture()
+ {
+ $frame = new FutureCheck();
+ $frame->addFuture(TEST_DOMAIN);
+ $frame->addFuture('przyklad1.pl');
+ $frame->addFuture('przyklad2.pl');
+ $frame->setClientTransactionId('ABC-12345');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+' . TEST_DOMAIN . '
+przyklad1.pl
+przyklad2.pl
+
+
+ABC-12345
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testDomainCheckFrameInvalidDomain()
+ {
+ $frame = new FutureCheck();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->addFuture('invalid_domain');
+ } else {
+ try {
+ $frame->addFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Check/FutureCheckTest7x.php b/tests/EPP/Extension/NASK/Check/FutureCheckTest7x.php
new file mode 100644
index 0000000..5c34ef2
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Check/FutureCheckTest7x.php
@@ -0,0 +1,79 @@
+addFuture()
+ */
+ public function testAddFuture()
+ {
+ $frame = new FutureCheck();
+ $frame->addFuture(TEST_DOMAIN);
+ $frame->addFuture('przyklad1.pl');
+ $frame->addFuture('przyklad2.pl');
+ $frame->setClientTransactionId('ABC-12345');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+' . TEST_DOMAIN . '
+przyklad1.pl
+przyklad2.pl
+
+
+ABC-12345
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testDomainCheckFrameInvalidDomain()
+ {
+ $frame = new FutureCheck();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->addFuture('invalid_domain');
+ } else {
+ try {
+ $frame->addFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Create/ContactCreateTest5x.php b/tests/EPP/Extension/NASK/Create/ContactCreateTest5x.php
new file mode 100644
index 0000000..eaeffb3
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Create/ContactCreateTest5x.php
@@ -0,0 +1,146 @@
+skipInt();
+ $frame->setId('sh8013');
+ $frame->setName('John Doe');
+ $frame->addStreet('123 Example Dr.');
+ $frame->addStreet('Suite 100');
+ $frame->setCity('Dulles');
+ $frame->setProvince('VA');
+ $frame->setPostalCode('20166-6503');
+ $frame->setCountryCode('US');
+ $frame->setVoice('+1.7035555555', 1234);
+ $frame->setFax('+1.7035555556');
+ $frame->setEmail('jdoe@example.tld');
+ $auth = $frame->setAuthInfo();
+ $frame->setIndividual(true);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+sh8013
+
+John Doe
+
+123 Example Dr.
+Suite 100
+Dulles
+VA
+20166-6503
+US
+
+
++1.7035555555
++1.7035555556
+jdoe@example.tld
+
+' . $auth . '
+
+
+
+
+
+1
+
+
+
+',
+ (string) $frame
+ );
+ }
+
+ public function testContactCreateFrameOrganization()
+ {
+ $frame = new Contact();
+ $frame->skipInt();
+ $frame->setId('sh8013');
+ $frame->setName('John Doe');
+ $frame->setOrganization('php-epp2');
+ $frame->addStreet('123 Example Dr.');
+ $frame->addStreet('Suite 100');
+ $frame->setCity('Dulles');
+ $frame->setProvince('VA');
+ $frame->setPostalCode('20166-6503');
+ $frame->setCountryCode('US');
+ $frame->setVoice('+1.7035555555', 1234);
+ $frame->setFax('+1.7035555556');
+ $frame->setEmail('jdoe@example.tld');
+ $auth = $frame->setAuthInfo();
+ $frame->setIndividual(false);
+ $frame->setConsentForPublishing(true);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+sh8013
+
+John Doe
+php-epp2
+
+123 Example Dr.
+Suite 100
+Dulles
+VA
+20166-6503
+US
+
+
++1.7035555555
++1.7035555556
+jdoe@example.tld
+
+' . $auth . '
+
+
+
+
+
+0
+1
+
+
+
+',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Create/ContactCreateTest7x.php b/tests/EPP/Extension/NASK/Create/ContactCreateTest7x.php
new file mode 100644
index 0000000..43353c9
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Create/ContactCreateTest7x.php
@@ -0,0 +1,146 @@
+skipInt();
+ $frame->setId('sh8013');
+ $frame->setName('John Doe');
+ $frame->addStreet('123 Example Dr.');
+ $frame->addStreet('Suite 100');
+ $frame->setCity('Dulles');
+ $frame->setProvince('VA');
+ $frame->setPostalCode('20166-6503');
+ $frame->setCountryCode('US');
+ $frame->setVoice('+1.7035555555', 1234);
+ $frame->setFax('+1.7035555556');
+ $frame->setEmail('jdoe@example.tld');
+ $auth = $frame->setAuthInfo();
+ $frame->setIndividual(true);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+sh8013
+
+John Doe
+
+123 Example Dr.
+Suite 100
+Dulles
+VA
+20166-6503
+US
+
+
++1.7035555555
++1.7035555556
+jdoe@example.tld
+
+' . $auth . '
+
+
+
+
+
+1
+
+
+
+',
+ (string) $frame
+ );
+ }
+
+ public function testContactCreateFrameOrganization()
+ {
+ $frame = new Contact();
+ $frame->skipInt();
+ $frame->setId('sh8013');
+ $frame->setName('John Doe');
+ $frame->setOrganization('php-epp2');
+ $frame->addStreet('123 Example Dr.');
+ $frame->addStreet('Suite 100');
+ $frame->setCity('Dulles');
+ $frame->setProvince('VA');
+ $frame->setPostalCode('20166-6503');
+ $frame->setCountryCode('US');
+ $frame->setVoice('+1.7035555555', 1234);
+ $frame->setFax('+1.7035555556');
+ $frame->setEmail('jdoe@example.tld');
+ $auth = $frame->setAuthInfo();
+ $frame->setIndividual(false);
+ $frame->setConsentForPublishing(true);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+sh8013
+
+John Doe
+php-epp2
+
+123 Example Dr.
+Suite 100
+Dulles
+VA
+20166-6503
+US
+
+
++1.7035555555
++1.7035555556
+jdoe@example.tld
+
+' . $auth . '
+
+
+
+
+
+0
+1
+
+
+
+',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Create/DomainCreateTest5x.php b/tests/EPP/Extension/NASK/Create/DomainCreateTest5x.php
new file mode 100644
index 0000000..4b5aca3
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Create/DomainCreateTest5x.php
@@ -0,0 +1,88 @@
+setDomain(TEST_DOMAIN);
+ $frame->setPeriod('1y');
+ $frame->addNs('ns1.' . TEST_DOMAIN);
+ $frame->addHostObj('ns2.' . TEST_DOMAIN);
+ $frame->setRegistrant('nsk1234');
+ $frame->setAdminContact('C002');
+ $frame->setTechContact('C003');
+ $frame->setBillingContact('C004');
+ $auth = $frame->setAuthInfo();
+ $frame->setBook();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+' . TEST_DOMAIN . '
+1
+ns1.' . TEST_DOMAIN . '
+ns2.' . TEST_DOMAIN . '
+nsk1234
+
+' . $auth . '
+
+
+
+
+
+
+
+
+
+',
+ (string) $frame
+ );
+ }
+
+ public function testDomainCreateFrameInvalidHostObj()
+ {
+ $frame = new Domain();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->addHostObj('invalid_domain');
+ } else {
+ try {
+ $frame->addHostObj('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Create/DomainCreateTest7x.php b/tests/EPP/Extension/NASK/Create/DomainCreateTest7x.php
new file mode 100644
index 0000000..de0e37e
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Create/DomainCreateTest7x.php
@@ -0,0 +1,88 @@
+setDomain(TEST_DOMAIN);
+ $frame->setPeriod('1y');
+ $frame->addNs('ns1.' . TEST_DOMAIN);
+ $frame->addHostObj('ns2.' . TEST_DOMAIN);
+ $frame->setRegistrant('nsk1234');
+ $frame->setAdminContact('C002');
+ $frame->setTechContact('C003');
+ $frame->setBillingContact('C004');
+ $auth = $frame->setAuthInfo();
+ $frame->setBook();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+' . TEST_DOMAIN . '
+1
+ns1.' . TEST_DOMAIN . '
+ns2.' . TEST_DOMAIN . '
+nsk1234
+
+' . $auth . '
+
+
+
+
+
+
+
+
+
+',
+ (string) $frame
+ );
+ }
+
+ public function testDomainCreateFrameInvalidHostObj()
+ {
+ $frame = new Domain();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->addHostObj('invalid_domain');
+ } else {
+ try {
+ $frame->addHostObj('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Create/FutureCreateTest5x.php b/tests/EPP/Extension/NASK/Create/FutureCreateTest5x.php
new file mode 100644
index 0000000..14f84e0
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Create/FutureCreateTest5x.php
@@ -0,0 +1,73 @@
+setFuture(TEST_DOMAIN);
+ $frame->setPeriod('3y');
+ $frame->setRegistrant('nsk1234');
+ $auth = $frame->setAuthInfo();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+ 3
+ nsk1234
+
+ ' . $auth . '
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureCreateFrameInvalidDomain()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Create/FutureCreateTest7x.php b/tests/EPP/Extension/NASK/Create/FutureCreateTest7x.php
new file mode 100644
index 0000000..972cf79
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Create/FutureCreateTest7x.php
@@ -0,0 +1,73 @@
+setFuture(TEST_DOMAIN);
+ $frame->setPeriod('3y');
+ $frame->setRegistrant('nsk1234');
+ $auth = $frame->setAuthInfo();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+ 3
+ nsk1234
+
+ ' . $auth . '
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureCreateFrameInvalidDomain()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Delete/FutureDeleteTest5x.php b/tests/EPP/Extension/NASK/Delete/FutureDeleteTest5x.php
new file mode 100644
index 0000000..1db4b63
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Delete/FutureDeleteTest5x.php
@@ -0,0 +1,65 @@
+setFuture(TEST_DOMAIN);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureDeleteFrameInvalidDomain()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Delete/FutureDeleteTest7x.php b/tests/EPP/Extension/NASK/Delete/FutureDeleteTest7x.php
new file mode 100644
index 0000000..06087c7
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Delete/FutureDeleteTest7x.php
@@ -0,0 +1,65 @@
+setFuture(TEST_DOMAIN);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureDeleteFrameInvalidDomain()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Info/ContactInfoTest5x.php b/tests/EPP/Extension/NASK/Info/ContactInfoTest5x.php
new file mode 100644
index 0000000..111247a
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Info/ContactInfoTest5x.php
@@ -0,0 +1,84 @@
+setId('666666');
+ $frame->setAuthInfo('2fooBAR');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ 666666
+
+
+
+
+
+ 2fooBAR
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameAuthinfoRoid()
+ {
+ $frame = new Contact();
+ $frame->setId('666666');
+ $frame->setAuthInfo('2fooBAR', '1234-NASK');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ 666666
+
+
+
+
+
+ 2fooBAR
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Info/ContactInfoTest7x.php b/tests/EPP/Extension/NASK/Info/ContactInfoTest7x.php
new file mode 100644
index 0000000..fbd76d0
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Info/ContactInfoTest7x.php
@@ -0,0 +1,84 @@
+setId('666666');
+ $frame->setAuthInfo('2fooBAR');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ 666666
+
+
+
+
+
+ 2fooBAR
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameAuthinfoRoid()
+ {
+ $frame = new Contact();
+ $frame->setId('666666');
+ $frame->setAuthInfo('2fooBAR', '1234-NASK');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ 666666
+
+
+
+
+
+ 2fooBAR
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Info/FutureInfoTest5x.php b/tests/EPP/Extension/NASK/Info/FutureInfoTest5x.php
new file mode 100644
index 0000000..be3ce66
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Info/FutureInfoTest5x.php
@@ -0,0 +1,113 @@
+setFuture(TEST_DOMAIN);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameAuthinfo()
+ {
+ $frame = new Future();
+ $frame->setFuture(TEST_DOMAIN);
+ $frame->setAuthInfo('password');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameAuthinfoRoid()
+ {
+ $frame = new Future();
+ $frame->setFuture(TEST_DOMAIN);
+ $frame->setAuthInfo('password', 'nsk1234');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameInvalidDomain()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Info/FutureInfoTest7x.php b/tests/EPP/Extension/NASK/Info/FutureInfoTest7x.php
new file mode 100644
index 0000000..198cb59
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Info/FutureInfoTest7x.php
@@ -0,0 +1,113 @@
+setFuture(TEST_DOMAIN);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameAuthinfo()
+ {
+ $frame = new Future();
+ $frame->setFuture(TEST_DOMAIN);
+ $frame->setAuthInfo('password');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameAuthinfoRoid()
+ {
+ $frame = new Future();
+ $frame->setFuture(TEST_DOMAIN);
+ $frame->setAuthInfo('password', 'nsk1234');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameInvalidDomain()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Renew/DomainRenewTest5x.php b/tests/EPP/Extension/NASK/Renew/DomainRenewTest5x.php
new file mode 100644
index 0000000..39548e7
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Renew/DomainRenewTest5x.php
@@ -0,0 +1,88 @@
+setDomain(TEST_DOMAIN);
+ $frame->setCurrentExpirationDate('2017-04-25');
+ $frame->setPeriod('1y');
+ $frame->setReactivate();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+ 2017-04-25
+ 1
+
+
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testDomainRenewToDate()
+ {
+ $frame = new Domain();
+ $frame->setDomain(TEST_DOMAIN);
+ $frame->setCurrentExpirationDate('2012-09-15');
+ $frame->setRenewToDate('2012-09-25');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+ 2012-09-15
+
+
+
+
+ 2012-09-25
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Renew/DomainRenewTest7x.php b/tests/EPP/Extension/NASK/Renew/DomainRenewTest7x.php
new file mode 100644
index 0000000..f6ad86d
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Renew/DomainRenewTest7x.php
@@ -0,0 +1,88 @@
+setDomain(TEST_DOMAIN);
+ $frame->setCurrentExpirationDate('2017-04-25');
+ $frame->setPeriod('1y');
+ $frame->setReactivate();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+ 2017-04-25
+ 1
+
+
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testDomainRenewToDate()
+ {
+ $frame = new Domain();
+ $frame->setDomain(TEST_DOMAIN);
+ $frame->setCurrentExpirationDate('2012-09-15');
+ $frame->setRenewToDate('2012-09-25');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+ 2012-09-15
+
+
+
+
+ 2012-09-25
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Renew/FutureRenewTest5x.php b/tests/EPP/Extension/NASK/Renew/FutureRenewTest5x.php
new file mode 100644
index 0000000..7205680
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Renew/FutureRenewTest5x.php
@@ -0,0 +1,70 @@
+setFuture(TEST_DOMAIN);
+ $frame->setCurrentExpirationDate('2017-04-25');
+ $frame->setPeriod('3y');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+ 2017-04-25
+ 3
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameInvalidDomain()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Renew/FutureRenewTest7x.php b/tests/EPP/Extension/NASK/Renew/FutureRenewTest7x.php
new file mode 100644
index 0000000..cc82e52
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Renew/FutureRenewTest7x.php
@@ -0,0 +1,70 @@
+setFuture(TEST_DOMAIN);
+ $frame->setCurrentExpirationDate('2017-04-25');
+ $frame->setPeriod('3y');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+ 2017-04-25
+ 3
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureInfoFrameInvalidDomain()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportCancelTest5x.php b/tests/EPP/Extension/NASK/Report/ReportCancelTest5x.php
new file mode 100644
index 0000000..4cdb165
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportCancelTest5x.php
@@ -0,0 +1,43 @@
+setReportId('e264a95d-0ba0-40f1-a0e0-97407fd5cdbe');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ e264a95d-0ba0-40f1-a0e0-97407fd5cdbe
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportCancelTest7x.php b/tests/EPP/Extension/NASK/Report/ReportCancelTest7x.php
new file mode 100644
index 0000000..8ac4b62
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportCancelTest7x.php
@@ -0,0 +1,43 @@
+setReportId('e264a95d-0ba0-40f1-a0e0-97407fd5cdbe');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ e264a95d-0ba0-40f1-a0e0-97407fd5cdbe
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportContactTest5x.php b/tests/EPP/Extension/NASK/Report/ReportContactTest5x.php
new file mode 100644
index 0000000..3aa4303
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportContactTest5x.php
@@ -0,0 +1,60 @@
+assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testReportSpecificContactFrame()
+ {
+ $frame = new Report();
+ $frame->setContactId('k13');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ k13
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportContactTest7x.php b/tests/EPP/Extension/NASK/Report/ReportContactTest7x.php
new file mode 100644
index 0000000..e7a564a
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportContactTest7x.php
@@ -0,0 +1,60 @@
+assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testReportSpecificContactFrame()
+ {
+ $frame = new Report();
+ $frame->setContactId('k13');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ k13
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportDomainTest5x.php b/tests/EPP/Extension/NASK/Report/ReportDomainTest5x.php
new file mode 100644
index 0000000..4ca0a74
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportDomainTest5x.php
@@ -0,0 +1,54 @@
+setState('STATE_REGISTERED');
+ $frame->setExDate('2007-05-07T11:23:00.0Z');
+ $frame->setStatusesIn(true);
+ $frame->addStatus('serverHold');
+ $frame->setOffset(0);
+ $frame->setLimit(50);
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+STATE_REGISTERED
+2007-05-07T11:23:00.0Z
+
+serverHold
+
+
+0
+50
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportDomainTest7x.php b/tests/EPP/Extension/NASK/Report/ReportDomainTest7x.php
new file mode 100644
index 0000000..deb75c4
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportDomainTest7x.php
@@ -0,0 +1,54 @@
+setState('STATE_REGISTERED');
+ $frame->setExDate('2007-05-07T11:23:00.0Z');
+ $frame->setStatusesIn(true);
+ $frame->addStatus('serverHold');
+ $frame->setOffset(0);
+ $frame->setLimit(50);
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+STATE_REGISTERED
+2007-05-07T11:23:00.0Z
+
+serverHold
+
+
+0
+50
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportFutureTest5x.php b/tests/EPP/Extension/NASK/Report/ReportFutureTest5x.php
new file mode 100644
index 0000000..8e5b7e8
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportFutureTest5x.php
@@ -0,0 +1,60 @@
+assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testReportSpecificFutureFrame()
+ {
+ $frame = new Report();
+ $frame->setExDate('2007-04-23T15:22:34.0Z');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ 2007-04-23T15:22:34.0Z
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportFutureTest7x.php b/tests/EPP/Extension/NASK/Report/ReportFutureTest7x.php
new file mode 100644
index 0000000..27077b2
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportFutureTest7x.php
@@ -0,0 +1,60 @@
+assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testReportSpecificFutureFrame()
+ {
+ $frame = new Report();
+ $frame->setExDate('2007-04-23T15:22:34.0Z');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ 2007-04-23T15:22:34.0Z
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportGetDataTest5x.php b/tests/EPP/Extension/NASK/Report/ReportGetDataTest5x.php
new file mode 100644
index 0000000..8e9fda4
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportGetDataTest5x.php
@@ -0,0 +1,43 @@
+setReportId('58ab3bd1-fcce-4c03-b159-8af5f1adb447');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ 58ab3bd1-fcce-4c03-b159-8af5f1adb447
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportGetDataTest7x.php b/tests/EPP/Extension/NASK/Report/ReportGetDataTest7x.php
new file mode 100644
index 0000000..9325944
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportGetDataTest7x.php
@@ -0,0 +1,43 @@
+setReportId('58ab3bd1-fcce-4c03-b159-8af5f1adb447');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ 58ab3bd1-fcce-4c03-b159-8af5f1adb447
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportHostTest5x.php b/tests/EPP/Extension/NASK/Report/ReportHostTest5x.php
new file mode 100644
index 0000000..3d800a8
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportHostTest5x.php
@@ -0,0 +1,60 @@
+assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testReportSpecificHostFrame()
+ {
+ $frame = new Report();
+ $frame->setName('ns1.temp.pl');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ns1.temp.pl
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportHostTest7x.php b/tests/EPP/Extension/NASK/Report/ReportHostTest7x.php
new file mode 100644
index 0000000..efe78ff
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportHostTest7x.php
@@ -0,0 +1,60 @@
+assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testReportSpecificHostFrame()
+ {
+ $frame = new Report();
+ $frame->setName('ns1.temp.pl');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ns1.temp.pl
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportPrepaidTest5x.php b/tests/EPP/Extension/NASK/Report/ReportPrepaidTest5x.php
new file mode 100644
index 0000000..3e7c361
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportPrepaidTest5x.php
@@ -0,0 +1,132 @@
+setPaymentsAccountType('domain');
+ $frame->setOffset(0);
+ $frame->setLimit(50);
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+domain
+
+
+0
+50
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testNaskPrepaidFundsFrame()
+ {
+ //ObjectSpec::overwriteParent();
+ $frame = new Report();
+ $frame->setFundsAccountType('DOMAIN');
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+DOMAIN
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testPrepaidFundsEnumFrame()
+ {
+ //ObjectSpec::overwriteParent();
+ $frame = new Report();
+ $frame->setFundsAccountType('ENUM');
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+ENUM
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testPrepaidFundsInvalidAccount()
+ {
+ $frame = new Report();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFundsAccountType('invalid');
+ } else {
+ try {
+ $frame->setFundsAccountType('invalid');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+
+ public function testPrepaidPaymentsInvalidAccount()
+ {
+ $frame = new Report();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setPaymentsAccountType('invalid');
+ } else {
+ try {
+ $frame->setPaymentsAccountType('invalid');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Report/ReportPrepaidTest7x.php b/tests/EPP/Extension/NASK/Report/ReportPrepaidTest7x.php
new file mode 100644
index 0000000..6efb8ab
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Report/ReportPrepaidTest7x.php
@@ -0,0 +1,132 @@
+setPaymentsAccountType('domain');
+ $frame->setOffset(0);
+ $frame->setLimit(50);
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+domain
+
+
+0
+50
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testNaskPrepaidFundsFrame()
+ {
+ //ObjectSpec::overwriteParent();
+ $frame = new Report();
+ $frame->setFundsAccountType('DOMAIN');
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+DOMAIN
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testPrepaidFundsEnumFrame()
+ {
+ //ObjectSpec::overwriteParent();
+ $frame = new Report();
+ $frame->setFundsAccountType('ENUM');
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+
+ENUM
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testPrepaidFundsInvalidAccount()
+ {
+ $frame = new Report();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFundsAccountType('invalid');
+ } else {
+ try {
+ $frame->setFundsAccountType('invalid');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+
+ public function testPrepaidPaymentsInvalidAccount()
+ {
+ $frame = new Report();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setPaymentsAccountType('invalid');
+ } else {
+ try {
+ $frame->setPaymentsAccountType('invalid');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/ReportTest5x.php b/tests/EPP/Extension/NASK/ReportTest5x.php
new file mode 100644
index 0000000..f1087cb
--- /dev/null
+++ b/tests/EPP/Extension/NASK/ReportTest5x.php
@@ -0,0 +1,45 @@
+setOffset(0);
+ $frame->setLimit(50);
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+0
+50
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/ReportTest7x.php b/tests/EPP/Extension/NASK/ReportTest7x.php
new file mode 100644
index 0000000..e592c05
--- /dev/null
+++ b/tests/EPP/Extension/NASK/ReportTest7x.php
@@ -0,0 +1,45 @@
+setOffset(0);
+ $frame->setLimit(50);
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+0
+50
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Transfer/DomainTransferTest5x.php b/tests/EPP/Extension/NASK/Transfer/DomainTransferTest5x.php
new file mode 100644
index 0000000..f504dca
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Transfer/DomainTransferTest5x.php
@@ -0,0 +1,60 @@
+setOperation('request');
+ $frame->setDomain(TEST_DOMAIN);
+ $frame->setAuthInfo('password');
+ $frame->resendConfirmationRequest();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Transfer/DomainTransferTest7x.php b/tests/EPP/Extension/NASK/Transfer/DomainTransferTest7x.php
new file mode 100644
index 0000000..3c040e5
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Transfer/DomainTransferTest7x.php
@@ -0,0 +1,60 @@
+setOperation('request');
+ $frame->setDomain(TEST_DOMAIN);
+ $frame->setAuthInfo('password');
+ $frame->resendConfirmationRequest();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Transfer/FutureTransferTest5x.php b/tests/EPP/Extension/NASK/Transfer/FutureTransferTest5x.php
new file mode 100644
index 0000000..fbcc88f
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Transfer/FutureTransferTest5x.php
@@ -0,0 +1,104 @@
+setOperation('request');
+ $frame->setFuture(TEST_DOMAIN);
+ $frame->setAuthInfo('password');
+ $frame->resendConfirmationRequest();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureTransferRoid()
+ {
+ $frame = new Future();
+ $frame->setOperation('request');
+ $frame->setFuture(TEST_DOMAIN);
+ $frame->setAuthInfo('password', '1234-NASK');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureTransferFrameInvalidFuture()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Transfer/FutureTransferTest7x.php b/tests/EPP/Extension/NASK/Transfer/FutureTransferTest7x.php
new file mode 100644
index 0000000..1b0548c
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Transfer/FutureTransferTest7x.php
@@ -0,0 +1,104 @@
+setOperation('request');
+ $frame->setFuture(TEST_DOMAIN);
+ $frame->setAuthInfo('password');
+ $frame->resendConfirmationRequest();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureTransferRoid()
+ {
+ $frame = new Future();
+ $frame->setOperation('request');
+ $frame->setFuture(TEST_DOMAIN);
+ $frame->setAuthInfo('password', '1234-NASK');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ password
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureTransferFrameInvalidFuture()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Update/ContactUpdateTest5x.php b/tests/EPP/Extension/NASK/Update/ContactUpdateTest5x.php
new file mode 100644
index 0000000..3ae563c
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Update/ContactUpdateTest5x.php
@@ -0,0 +1,82 @@
+setId('sh8013');
+ $frame->setIndividual(true);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ sh8013
+
+
+
+
+ 1
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testContactUpdateConsent()
+ {
+ $frame = new Contact();
+ $frame->setId('sh8013');
+ $frame->setConsentForPublishing(false);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ sh8013
+
+
+
+
+ 0
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Update/ContactUpdateTest7x.php b/tests/EPP/Extension/NASK/Update/ContactUpdateTest7x.php
new file mode 100644
index 0000000..6b28db4
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Update/ContactUpdateTest7x.php
@@ -0,0 +1,82 @@
+setId('sh8013');
+ $frame->setIndividual(true);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ sh8013
+
+
+
+
+ 1
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testContactUpdateConsent()
+ {
+ $frame = new Contact();
+ $frame->setId('sh8013');
+ $frame->setConsentForPublishing(false);
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ sh8013
+
+
+
+
+ 0
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Update/DomainUpdateTest5x.php b/tests/EPP/Extension/NASK/Update/DomainUpdateTest5x.php
new file mode 100644
index 0000000..35900b8
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Update/DomainUpdateTest5x.php
@@ -0,0 +1,83 @@
+setDomain(TEST_DOMAIN);
+ $frame->addNs('ns1.' . TEST_DOMAIN);
+ $frame->removeHostObj('ns2.' . TEST_DOMAIN);
+ $frame->addAdminContact('C012');
+ $frame->addTechContact('C013');
+ $frame->addBillingContact('C014');
+ $frame->removeAdminContact('C002');
+ $frame->removeTechContact('C003');
+ $frame->removeBillingContact('C004');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ ns1.' . TEST_DOMAIN . '
+
+
+ ns2.' . TEST_DOMAIN . '
+ C002
+ C003
+ C004
+
+
+
+
+
+',
+ (string) $frame
+ );
+ }
+
+ public function testDomainUpdateFrameRemovesInvalidNs()
+ {
+ $frame = new Domain();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->removeNs('invalid_domain');
+ } else {
+ try {
+ $frame->removeNs('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Update/DomainUpdateTest7x.php b/tests/EPP/Extension/NASK/Update/DomainUpdateTest7x.php
new file mode 100644
index 0000000..a814e23
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Update/DomainUpdateTest7x.php
@@ -0,0 +1,83 @@
+setDomain(TEST_DOMAIN);
+ $frame->addNs('ns1.' . TEST_DOMAIN);
+ $frame->removeHostObj('ns2.' . TEST_DOMAIN);
+ $frame->addAdminContact('C012');
+ $frame->addTechContact('C013');
+ $frame->addBillingContact('C014');
+ $frame->removeAdminContact('C002');
+ $frame->removeTechContact('C003');
+ $frame->removeBillingContact('C004');
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ ns1.' . TEST_DOMAIN . '
+
+
+ ns2.' . TEST_DOMAIN . '
+ C002
+ C003
+ C004
+
+
+
+
+
+',
+ (string) $frame
+ );
+ }
+
+ public function testDomainUpdateFrameRemovesInvalidNs()
+ {
+ $frame = new Domain();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->removeNs('invalid_domain');
+ } else {
+ try {
+ $frame->removeNs('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Update/FutureUpdateTest5x.php b/tests/EPP/Extension/NASK/Update/FutureUpdateTest5x.php
new file mode 100644
index 0000000..bd980dd
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Update/FutureUpdateTest5x.php
@@ -0,0 +1,75 @@
+setFuture(TEST_DOMAIN);
+ $frame->changeRegistrant('nsk001');
+ $auth = $frame->changeAuthInfo();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ nsk001
+
+ ' . $auth . '
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureUpdateFrameInvalidFuture()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}
diff --git a/tests/EPP/Extension/NASK/Update/FutureUpdateTest7x.php b/tests/EPP/Extension/NASK/Update/FutureUpdateTest7x.php
new file mode 100644
index 0000000..ca177f8
--- /dev/null
+++ b/tests/EPP/Extension/NASK/Update/FutureUpdateTest7x.php
@@ -0,0 +1,75 @@
+setFuture(TEST_DOMAIN);
+ $frame->changeRegistrant('nsk001');
+ $auth = $frame->changeAuthInfo();
+
+ $this->assertXmlStringEqualsXmlString(
+ '
+
+
+
+
+ ' . TEST_DOMAIN . '
+
+ nsk001
+
+ ' . $auth . '
+
+
+
+
+
+
+
+ ',
+ (string) $frame
+ );
+ }
+
+ public function testFutureUpdateFrameInvalidFuture()
+ {
+ $frame = new Future();
+
+ if (method_exists($this, 'expectException')) {
+ $this->expectException(Exception::class);
+ $frame->setFuture('invalid_domain');
+ } else {
+ try {
+ $frame->setFuture('invalid_domain');
+ } catch (Exception $e) {
+ $this->assertEquals('Exception', get_class($e));
+ }
+ }
+ }
+}