svn: /pear/packages/Net_URL2/trunk/tests/ URL2Test.php
| From: | Till Klampaeckel | Date: | Sun, 13 Mar 2011 04:27:54 +0000 |
| Subject: | svn: /pear/packages/Net_URL2/trunk/tests/ URL2Test.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-61427@lists.php.net to get a copy of this message | ||
till Sun, 13 Mar 2011 04:27:54 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=309162
Log:
* committed a test for #14178
Bug: http://pear.php.net/bugs/14178 (unknown)
Changed paths:
U pear/packages/Net_URL2/trunk/tests/URL2Test.php
Modified: pear/packages/Net_URL2/trunk/tests/URL2Test.php
===================================================================
--- pear/packages/Net_URL2/trunk/tests/URL2Test.php 2011-03-13 04:22:24 UTC (rev 309161)
+++ pear/packages/Net_URL2/trunk/tests/URL2Test.php 2011-03-13 04:27:54 UTC (rev 309162)
@@ -259,10 +259,33 @@
strval($url)
);
}
+
+ /**
+ * A dataProvider for {@link self::testRemoveDotSegments()}.
+ *
+ * @return array
+ */
+ public static function pathProvider()
+ {
+ return array(
+ array('../foo/bar.php', '../foo/bar.php'),
+ array('/foo/../bar/boo.php', '/bar/boo.php'),
+ array('/boo/..//foo//bar.php', '//foo//bar.php'),
+ array('/./foo/././bar.php', '/foo/bar.php'),
+ array('./.', './'),
+ );
+ }
+
+ /**
+ * @dataProvider pathProvider
+ */
+ public function testRemoveDotSegments($path, $assertion)
+ {
+ $this->assertEquals($assertion, Net_URL2::removeDotSegments($path));
+ }
}
// Call Net_URL2Test::main() if this source file is executed directly.
if (PHPUnit_MAIN_METHOD == "Net_URL2Test::main") {
Net_URL2Test::main();
}
-?>