php - POST parameters to PHPUnit test -


i'm new on testing, i'm using phpunit write test. site has been designed using mvc pattern.

i test each method on controllers, problem such methods receives parameters though $_post variable. how can overwrite variable?

thanks in advance alejandra

the best approach abstract request separate class , not access superglobals @ all. way decouple actual server , request environment application. can mock request easily.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -