Public Member Functions

CAS_ProxiedService_Testable Interface Reference

Inheritance diagram for CAS_ProxiedService_Testable:
CAS_ProxiedService_Abstract CAS_ProxiedService_Http_Abstract CAS_ProxiedService_Imap CAS_ProxiedService_Http_Get CAS_ProxiedService_Http_Post

List of all members.

Public Member Functions

 setCasClient (CAS_Client $casClient)

Detailed Description

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.


Member Function Documentation

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.

Parameters:
CAS_Client $casClient
Returns:
void
Exceptions:
CAS_OutOfSequenceException If called after a proxy ticket has already been initialized/set.

Implemented in CAS_ProxiedService_Abstract.