lithium\tests\cases\data\source\HttpTest::testUpdateWithModel PHP Method

testUpdateWithModel() public method

public testUpdateWithModel ( )
    public function testUpdateWithModel()
    {
        $http = new Http($this->_testConfig);
        $query = new Query(array('model' => $this->_model, 'data' => array('id' => '1', 'title' => 'Test Title')));
        $result = $http->update($query);
        $expected = join("\r\n", array('PUT /posts/1 HTTP/1.1', 'Host: localhost:80', 'Connection: Close', 'User-Agent: Mozilla/5.0', 'Content-Type: application/x-www-form-urlencoded', 'Content-Length: 16', '', 'title=Test+Title'));
        $result = (string) $http->last->request;
        $this->assertEqual($expected, $result);
    }