Public Member Functions | |
setCasClient (CAS_Client $casClient) |
This interface defines methods that allow proxy-authenticated service handlers to be tested in unit tests.
Classes implementing this interface SHOULD store the CAS_Client passed and initialize themselves with that client rather than via the static phpCAS method. For example:
/ ** * Fetch our proxy ticket. * / protected function initializeProxyTicket() { // Allow usage of a particular CAS_Client for unit testing. if (is_null($this->casClient)) phpCAS::initializeProxiedService($this); else $this->casClient->initializeProxiedService($this); }
Definition at line 50 of file Testable.php.
CAS_ProxiedService_Testable::setCasClient | ( | CAS_Client $ | casClient | ) |
Use a particular CAS_Client->initializeProxiedService() rather than the static phpCAS::initializeProxiedService().
This method should not be called in standard operation, but is needed for unit testing.
CAS_Client | $casClient |
CAS_OutOfSequenceException | If called after a proxy ticket has already been initialized/set. |
Implemented in CAS_ProxiedService_Abstract.