Exemple #1
0
 public function testSetNullParamsUnsetsKeys()
 {
     $this->_request->setParams(array('foo' => 'bar', 'bar' => 'baz'));
     $this->assertEquals('bar', $this->_request->getParam('foo'));
     $this->assertEquals('baz', $this->_request->getParam('bar'));
     $this->_request->setParams(array('foo' => null));
     $params = $this->_request->getParams();
     $this->assertFalse(isset($params['foo']));
     $this->assertTrue(isset($params['bar']));
 }