title: how to test a function with phpunit where input parameters are extracted from $_POST
body: <p>i have stuck at a point for quite some time</p>
  
  <p>i have to test a function where the parameters are extracted from the $_POST global array.</p>
  
  <p>look at the following for a better clarification</p>
  
  <p>my function looks like this</p>
  
  <pre><code>function getUsers()
         {
  
             extract($_POST);
         $usersQry=$this-&gt;db-&gt;query("select user from user_table where org_type='".$orgType."'")
         return $usersQry;
  }
  </code></pre>
  
  <p>in the above <strong>$orgType</strong> is an index in $_POST array.</p>
  
  <p>as no parameter is passed to the function <strong>getuser()</strong> i can not pass parameters as array  from the test file.see below</p>
  
  <pre><code> $testdata=$this-&gt;users_model-&gt;getUsers($orgType);// i can not go for this option in test file
  </code></pre>
  
  <p>please post some alternatives and help me to get out of this juncture.</p>
  
  <p>thanks.</p>