Ticket Details
Tweaking lithium\action\Request class
PULL REQUEST Ticket (pending)
###What happened: Two tests in lithium\tests\cases\action\RequestTest were failing, and one line was not covered. ###What was expected: All tests to pass with 100% coverage. Unrelated to my previous commit, here is a second one: [commit e4649bb11d078da8bceb7e58aade32c23a717506](http://rad-dev.org/forks/svemir/lithium/commits/view/e4649bb11d078da8bceb7e58aade32c23a717506) When SERVER_ADDR not provided, use LOCAL_ADDR if it is there (e.g. IIS) When CONTENT_TYPE is a blank string, do not pass that up to Message::type, so that we get correct default type back. Message class has $this->_type set to 'html', and the existing unit test was expecting that to be returned. Request::accepts was trying to return 'html' by default, but that condition was not triggered by any unit test, and it did not seem possible to happen anyway. However, a malformed HTTP_ACCEPT would trip it to return nothing. Added a unit test to prove it (coverage of Request class 100% now.) Made sure MockIisRequest has REMOTE_ADDR and LOCAL_ADDR to fix testRemoteAddrFromHttpPcRemoteAddr.
Updates
on 01.08.11
by svemir
on 01.18.11
by svemir
- description was changed