function setUp() { $this->_request = new \HTRouter\Request(); $this->_request->setFilename("foo"); $this->_request->setDocumentRoot("/www"); $this->_request->setHostname("php.unittest.org"); }
function testSubstitution_008() { $this->_request->setFilename("foo.php"); $this->_request->setPathInfo("/bar"); $this->_request->setArgs(array("k" => "v", "t" => "s")); $this->assertEquals("foo.php/bark=v&t=s", Rule::expandSubstitutions("%{SCRIPT_FILENAME}%{PATH_INFO}%{QUERY_STRING}", $this->_request)); }
function setUp() { $this->_condition = new Condition('%{REQUEST_FILENAME}', '!-f', '[NV]'); $this->_request = new \HTRouter\Request(); $this->_request->setFilename("foo"); $this->_request->setDocumentRoot("/www"); $this->_request->setHostname("php.unittest.org"); }