Ejemplo n.º 1
0
 public function testSetPost()
 {
     $this->_model = $this->_model = $this->getModel();
     $post = ['one' => '111', 'two' => '222'];
     $this->_model->setPost($post);
     $this->assertEquals($post, $_POST);
     $this->_model->setPost([]);
     $this->assertEmpty($_POST);
     $_POST = ['post_var' => 'post_value'];
     $this->_model->setPost('post_var 2', 'post_value 2');
     $this->assertEquals(['post_var' => 'post_value', 'post_var 2' => 'post_value 2'], $_POST);
 }
Ejemplo n.º 2
0
 public function testSetPost()
 {
     $this->_model = new Request($this->_routerListMock, $this->_infoProcessorMock);
     $post = ['one' => '111', 'two' => '222'];
     $this->_model->setPost($post);
     $this->assertEquals($post, $_POST);
     $this->_model->setPost([]);
     $this->assertEmpty($_POST);
     $_POST = ['post_var' => 'post_value'];
     $this->_model->setPost('post_var 2', 'post_value 2');
     $this->assertEquals(['post_var' => 'post_value', 'post_var 2' => 'post_value 2'], $_POST);
 }