Stud.IP  5.4
fakeserver.php File Reference

Functions

 fakeServer ($uri, $domains)
 
 fakeServerGlobals ($uri)
 
 computeRelativePath ()
 
 computeAbsoluteURI ()
 
 echoWebGlobals ()
 

Variables

 $STUDIP_BASE_PATH = realpath(dirname(__FILE__) . '/../..')
 
 $ABSOLUTE_PATH_STUDIP = $STUDIP_BASE_PATH . '/public/'
 

Function Documentation

◆ computeAbsoluteURI()

computeAbsoluteURI ( )

Computes $ABSOLUTE_URI_STUDIP. Must be called after computeRelativePath.

◆ computeRelativePath()

computeRelativePath ( )

Compute $CANONICAL_RELATIVE_PATH_STUDIP. Must be called after fakeserver().

◆ echoWebGlobals()

echoWebGlobals ( )

Utility to help with debugging unit test creation. Should not be called in working unit tests.

◆ fakeServer()

fakeServer (   $uri,
  $domains 
)

Set various variables that are usually present when running Stud.IP on a server.

Parameters
$uristring URI to "opened" site on faked server.
$domainsstring-array Value to which $STUDIP_DOMAINS is set.

◆ fakeServerGlobals()

fakeServerGlobals (   $uri)

Set various PHP globals that are usually present on a server.

Parameters
$uristring URI to "opened" site on faked server.

Variable Documentation

◆ $ABSOLUTE_PATH_STUDIP

$ABSOLUTE_PATH_STUDIP = $STUDIP_BASE_PATH . '/public/'

◆ $STUDIP_BASE_PATH

$STUDIP_BASE_PATH = realpath(dirname(__FILE__) . '/../..')