Esempio n. 1
0
 /**
  * Tests
  */
 public function testParams()
 {
     $get_array = array('page' => 'Home', 'handler' => 'GET', 'foo' => 'get');
     $post_array = array('handler' => 'POST', 'action' => 'Save', 'foo' => 'post');
     $this->simulate_cgi_request($get_array, $post_array);
     $request = new NeechyRequest();
     $this->assertEquals('Home', $request->page);
     $this->assertEquals('post', $request->handler);
     $this->assertEquals('save', $request->action);
     $this->assertEquals('post', $request->param('foo'));
     $this->assertEquals('GET', $request->get('handler'));
     $this->assertEquals('POST', $request->post('handler'));
 }