From efa8f77eba29319b028256aa55aec530d3e2e668 Mon Sep 17 00:00:00 2001 From: Joshua Sherman Date: Mon, 30 Dec 2013 23:29:52 -0500 Subject: [PATCH] More tests --- tests/classes/ControllerTest.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tests/classes/ControllerTest.php b/tests/classes/ControllerTest.php index 5f8392c..1c94968 100644 --- a/tests/classes/ControllerTest.php +++ b/tests/classes/ControllerTest.php @@ -32,13 +32,25 @@ class ControllerTest extends PHPUnit_Framework_TestCase { $this->fail(); } + */ public function testAttributesInURI() { - /testing/id:123/foo:bar - $this->fail(); + setUpRequest('home/id:123'); + + new Controller(); + + $this->assertEquals(123, Browser::get('id')); + + setUpRequest('home/id:456/foo:bar'); + + new Controller(); + + // Compensates for 2 empty template executions of the Controller + $this->expectOutputString('[][]'); + $this->assertEquals(456, Browser::get('id')); + $this->assertEquals('bar', Browser::get('foo')); } - */ public function testUpperCaseURI() {