Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/PHPUnit/Controller/AbstractControllerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ function(&$item, $key) { $item = $key . '=' . $item; }
$request->setQuery(new Parameters($query));
$request->setPost(new Parameters($post));
$request->setUri($uri);
$request->setRequestUri($uri->getPath());

return $this;
}
Expand Down
6 changes: 6 additions & 0 deletions test/PHPUnit/Controller/AbstractControllerTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,10 @@ public function testAssertApplicationErrorsEvents()
$this->assertEquals(true, $result->stopped());
$this->assertEquals(Application::ERROR_ROUTER_NO_MATCH, $this->getApplication()->getMvcEvent()->getError());
}

public function testDispatchRequestUri()
{
$this->dispatch('/tests');
$this->assertEquals('/tests', $this->getApplication()->getRequest()->getRequestUri());
}
}

0 comments on commit 157b3a0

Please # to comment.