I am doing a POST request to this webservice
<?
session_start();
$request = array();
$request = $_POST;
echo $_SESSION['USER'];
echo $_SESSION['ORG'];
?>
using simpletest API,
class GetTest extends WebTestCase
{
/**
* Unit Test function checking POST requests
*
* @return NULL
*/
function testPostRequest()
{
session_start();
$_SESSION['ORG'] = 'someorg';
$_SESSION['USER'] = 'someuser';
$value = array("postdata"=>"somepost")
$temp = $this->post("127.0.0.1/create.php",$value);
print $temp;
}
}
When i execute the unittest script it is not printing anything, that means session variables are not getting set. Is there some other way to make it work? Both these scripts are on same server.