/**
  * @param string $scriptName
  * @param array  $variables
  * @test
  * @dataProvider provideDataForScriptName
  */
 public function getsTheScriptName($scriptName, array $variables)
 {
     foreach ($variables as $key => $value) {
         $_SERVER[$key] = $value;
     }
     $this->assertEquals($scriptName, Stagehand_HTTP_ServerEnv::getScriptName());
 }
Esempio n. 2
0
 /**
  * Creates a Piece_Unity_Request object and sets an event to the context.
  */
 public function __construct()
 {
     $this->_session = new Piece_Unity_Session();
     $this->_scriptName = $this->_originalScriptName = Stagehand_HTTP_ServerEnv::getScriptName();
     $this->_basePath = $this->_getBasePath();
 }