Phalcon\Test\Unit\Http\RequestTest::testHttpRequestInputPost PHP Method

testHttpRequestInputPost() public method

Tests POST functions
Since: 2014-10-04
Author: Nikolaos Dimopoulos ([email protected])
    public function testHttpRequestInputPost()
    {
        $this->specify("hasPost for empty element returns incorrect results", function () {
            $this->hasEmpty('hasPost');
        });
        $this->specify("hasPost for set element returns incorrect results", function () {
            $this->hasNotEmpty('hasPost', 'setPostVar');
        });
        $this->specify("getPost for empty element returns incorrect results", function () {
            $this->getEmpty('getPost');
        });
        $this->specify("getPost returns incorrect results", function () {
            $this->getNotEmpty('getPost', 'setPostVar');
        });
        $this->specify("getPost does not return sanitized data", function () {
            $this->getSanitized('getPost', 'setPostVar');
        });
        $this->specify("getPost with array as filter does not return sanitized data", function () {
            $this->getSanitizedArrayFilter('getPost', ['string'], 'setPostVar');
        });
    }