From 5f00ab850d2cdb4ab0e2842c40eb3483fc66476d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Krynicki?= Date: Sat, 23 Jun 2012 14:58:43 +0200 Subject: [PATCH 1/2] added tests for http_build_query(), RecursiveDirectoryIterator::getSubPath() --- ...iveDirectoryIterator_getSubPath_basic.phpt | 48 +++++++++++++++++++ .../tests/strings/http_build_query_error.phpt | 13 +++++ 2 files changed, 61 insertions(+) create mode 100644 ext/spl/tests/RecursiveDirectoryIterator_getSubPath_basic.phpt create mode 100644 ext/standard/tests/strings/http_build_query_error.phpt diff --git a/ext/spl/tests/RecursiveDirectoryIterator_getSubPath_basic.phpt b/ext/spl/tests/RecursiveDirectoryIterator_getSubPath_basic.phpt new file mode 100644 index 0000000000000..90966a617eb0a --- /dev/null +++ b/ext/spl/tests/RecursiveDirectoryIterator_getSubPath_basic.phpt @@ -0,0 +1,48 @@ +--TEST-- +RecursiveDirectoryIterator::getBasePath() - basic test +--CREDITS-- +Pawel Krynicki +#testfest AmsterdamPHP 2012-06-23 +--FILE-- +valid()) + { + echo $it->getSubPath()."\n"; + $it->next(); + } +?> +--CLEAN-- + + +--EXPECT-- +a0c967a6c2c34786e4802f59af9356f5/9925aabb545352472e4d77942627b507 +a0c967a6c2c34786e4802f59af9356f5 \ No newline at end of file diff --git a/ext/standard/tests/strings/http_build_query_error.phpt b/ext/standard/tests/strings/http_build_query_error.phpt new file mode 100644 index 0000000000000..30155e62a39b3 --- /dev/null +++ b/ext/standard/tests/strings/http_build_query_error.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing error on null parameter 1 of http_build_query() +--CREDITS-- +Pawel Krynicki +#testfest AmsterdamPHP 2012-06-23 +--FILE-- + +--EXPECTF-- +Warning: http_build_query(): Parameter 1 expected to be Array or Object. %s value given in %s on line %d \ No newline at end of file From 3bc20bb6a915eceeb25c7985c7981afe7c4e5fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Krynicki?= Date: Sat, 23 Jun 2012 15:52:09 +0200 Subject: [PATCH 2/2] added basic test for RecursiveDirectoryIterator::getSubPathname() --- ...irectoryIterator_getSubPathname_basic.phpt | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 ext/spl/tests/RecursiveDirectoryIterator_getSubPathname_basic.phpt diff --git a/ext/spl/tests/RecursiveDirectoryIterator_getSubPathname_basic.phpt b/ext/spl/tests/RecursiveDirectoryIterator_getSubPathname_basic.phpt new file mode 100644 index 0000000000000..883192fc67c94 --- /dev/null +++ b/ext/spl/tests/RecursiveDirectoryIterator_getSubPathname_basic.phpt @@ -0,0 +1,55 @@ +--TEST-- +RecursiveDirectoryIterator::getBasePathname() - basic test +--CREDITS-- +Pawel Krynicki +#testfest AmsterdamPHP 2012-06-23 +--FILE-- +valid()) + { + echo $it->getSubPathname()."\n"; + $it->next(); + } +?> +--CLEAN-- + + +--EXPECT-- +.. +.. +getSubPathname_test_1.tmp +. +a0c967a6c2c34786e4802f59af9356f5/9925aabb545352472e4d77942627b507/getSubPathname_test_2.tmp +a0c967a6c2c34786e4802f59af9356f5/. +a0c967a6c2c34786e4802f59af9356f5/getSubPathname_test_3.tmp \ No newline at end of file