Welcome Guest, Not a member yet? Register   Sign In
Setting $_POST, Getting with input->post
#4

[eluser]jlester[/eluser]
That's a sound idea. If I were going make a habit of populating the $_POST var in production code (which I won't) I most certainly would, but as I'm only doing this as a surrogate form submit within the integration server test suite it doesn't seem necessary.

My initial confusion stemmed from my changing a variable name in one of the methods that I was testing but not changing it everywhere. That mistake caused the method to silently fail (not sure why it didn't raise an error). We are using Toast as the test framework and the developer who originally built it had a call to clear the database before every test that I didn't catch until later. It looked like the tests were running but not populating the database with anything. To me it looked like the $_POST variable wasn't being read by input->post() in the tested methods. Once the code was reorganized to not clear the database before every test the actual issue (and how the test framework behaves) became very clear.


Messages In This Thread
Setting $_POST, Getting with input->post - by El Forum - 06-01-2011, 02:12 PM
Setting $_POST, Getting with input->post - by El Forum - 06-01-2011, 02:38 PM
Setting $_POST, Getting with input->post - by El Forum - 06-01-2011, 06:05 PM
Setting $_POST, Getting with input->post - by El Forum - 06-01-2011, 06:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB