From c0c103a6d604c501fd999b3d337c4d77db27fdd0 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 25 Oct 2011 00:02:45 -0500 Subject: [PATCH] added uri class tests. --- tests/Cases/UriTest.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/Cases/UriTest.php diff --git a/tests/Cases/UriTest.php b/tests/Cases/UriTest.php new file mode 100644 index 00000000..54d454a7 --- /dev/null +++ b/tests/Cases/UriTest.php @@ -0,0 +1,32 @@ + $uri)); + + $this->assertEquals($uri->get(), $expectation); + } + + public function uri_provider() + { + return array( + array('/index.php/', '/'), + array('/index.php//', '/'), + array('', '/'), + array('/', '/'), + array('/index.php/user', 'user'), + array('/index.php/user/something', 'user/something'), + array('/user', 'user'), + array('/user/something', 'user/something'), + array('http://localhost/index.php/user', 'user'), + array('http://localhost/user', 'user'), + array('http://localhost/index.php/', '/'), + ); + } + +} \ No newline at end of file