anewt-developers team mailing list archive
-
anewt-developers team
-
Mailing list archive
-
Message #00120
[Branch ~uws/anewt/anewt.uws] Rev 1715: [core] Cleanup AnewtURL test code
------------------------------------------------------------
revno: 1715
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Sun 2009-08-02 13:05:55 +0200
message:
[core] Cleanup AnewtURL test code
modified:
core/url.test.php
--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws
Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.
=== modified file 'core/url.test.php'
--- core/url.test.php 2009-07-20 20:25:40 +0000
+++ core/url.test.php 2009-08-02 11:05:55 +0000
@@ -1,6 +1,6 @@
<?php
-class AnewtUrlTest extends PHPUnit_Framework_TestCase
+class AnewtURLTest extends PHPUnit_Framework_TestCase
{
function url_provider()
{
@@ -120,7 +120,7 @@
'test?foo&bar=test&baz'
),
- /* Url encode/decode */
+ /* URL encode/decode */
array(
'&&',
null,
@@ -144,7 +144,7 @@
*/
function test_build($path, $parameters, $expected)
{
- $url = AnewtUrl::build($path, $parameters);
+ $url = AnewtURL::build($path, $parameters);
$this->assertEquals($expected, $url);
}
@@ -156,7 +156,7 @@
if (is_null($parameters_expected))
$parameters_expected = array();
- list ($path_out, $parameters_out) = AnewtUrl::parse($input);
+ list ($path_out, $parameters_out) = AnewtURL::parse($input);
$this->assertEquals($parameters_expected, $parameters_out);
@@ -165,38 +165,4 @@
}
}
-
-// /* Test URL::parse and URL::unparse */
-// $url = 'http://www.example.com/some/page?foo=3&foo=bar&baz=foo;';
-// $x = URL::parse($url);
-// list($base, $args) = $x;
-// assert('$base === "http://www.example.com/some/page"');
-// assert('is_assoc_array($args)');
-// assert('count($args) == 2');
-// assert('array_has_key($args, "foo")');
-// assert('$args["foo"] === "bar"');
-//
-// $url = 'page.php?foo=3&bar=123';
-// $x = URL::parse($url);
-// list($base, $args) = $x;
-// assert('is_assoc_array($args)');
-// assert('count($args) == 2');
-// assert('array_has_key($args, "foo")');
-// assert('$args["foo"] === "3"');
-// assert('array_has_key($args, "bar")');
-// assert('$args["bar"] === "123"');
-//
-//
-// $url = 'http://example.com/some/page.php?foo=3&bar=123';
-// $x = URL::parse($url);
-// list($base, $args) = $x;
-// $y = URL::unparse($base, $args);
-// assert('$y === $url');
-//
-// $url = '/some/page.php';
-// $x = URL::parse($url);
-// list($base, $args) = $x;
-// $y = URL::unparse($base, $args);
-// assert('$y === $url');
-
?>