Back to index

php5  5.3.10
Public Member Functions | Protected Attributes
gtTestSubject Class Reference
Inheritance diagram for gtTestSubject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 getMandatoryArgumentNames ()
 Return the list of all mandatory argument names.
 getOptionalArgumentNames ()
 Return the list of all optional argument names.
 setArgumentLists ()
 setExtraArgumentList ()
 Set the argument list to call the subject with.
 getExtraArgumentList ()
 Return the list of arguments as it appears in the function call.
 setShortArgumentList ()
 Set the list of function arguments to be one less that the number of mandatory arguments.
 getShortArgumentList ()
 Return the short list of arguments.
 setValidArgumentLists ()
 Construct the list of all possible ways to call the subject (function or method)
 getValidArgumentLists ()
 Return the array of all possible sets of method/function arguments.
 getMaximumArgumentList ()
 Returns the argument list with the greatest possible number of arguments.
 setInitialisationStatements ()
 Write initialisation statemenst for all the variables that might be used.
 getInitialisationStatements ()
 Return the initialisation statements.

Protected Attributes

 $optionalArgumentNames
 $mandatoryArgumentNames
 $extraArgumentList = ''
 $shortArgumentList = ''
 $allowedArgumentLists
 $maximumArgumentList
 $initialisationStatements

Detailed Description

Definition at line 2 of file gtTestSubject.php.


Member Function Documentation

Return the list of arguments as it appears in the function call.

Returns:
string - list of arguments

Definition at line 67 of file gtTestSubject.php.

Return the initialisation statements.

Returns:
unknown

Definition at line 162 of file gtTestSubject.php.

Return the list of all mandatory argument names.

Returns:
array

Definition at line 21 of file gtTestSubject.php.

Returns the argument list with the greatest possible number of arguments.

Returns:
string

Definition at line 135 of file gtTestSubject.php.

                                           {
    return end($this->allowedArgumentLists);
  }

Return the list of all optional argument names.

Returns:
array

Definition at line 31 of file gtTestSubject.php.

Return the short list of arguments.

Returns:
string - list of arguments

Definition at line 92 of file gtTestSubject.php.

Return the array of all possible sets of method/function arguments.

Returns:
unknown

Definition at line 125 of file gtTestSubject.php.

Definition at line 35 of file gtTestSubject.php.

Here is the call graph for this function:

Set the argument list to call the subject with.

Adds one extra argument.

Definition at line 45 of file gtTestSubject.php.

                                         {
    if(count ($this->mandatoryArgumentNames) > 0) {
      for( $i = 0; $i < count( $this->mandatoryArgumentNames ); $i++) {
        $this->extraArgumentList .= "\$".$this->mandatoryArgumentNames[$i].", ";
      }
    }
     
    if(count ($this->optionalArgumentNames) > 0) {
      for( $i = 0; $i < count( $this->optionalArgumentNames ); $i++) {
        $this->extraArgumentList .=  "\$".$this->optionalArgumentNames[$i].", ";
      }
    }

    $this->extraArgumentList= $this->extraArgumentList. "\$extra_arg";
  }

Here is the caller graph for this function:

Write initialisation statemenst for all the variables that might be used.

Definition at line 144 of file gtTestSubject.php.

                                                {
    if(count ($this->mandatoryArgumentNames) > 0) {
      foreach( $this->mandatoryArgumentNames as $name) {
        $this->initialisationStatements[] = "\$".$name." = ";
      }
    }
    if(count ($this->optionalArgumentNames) > 0) {
      foreach( $this->optionalArgumentNames as $name) {
        $this->initialisationStatements[] = "\$".$name." = ";
      }
    }
  }

Set the list of function arguments to be one less that the number of mandatory arguments.

Definition at line 76 of file gtTestSubject.php.

                                         {

    if(count ($this->mandatoryArgumentNames) > 0) {
      for( $i = 0; $i < count( $this->mandatoryArgumentNames ) - 1; $i++) {
        $this->shortArgumentList .= "\$".$this->mandatoryArgumentNames[$i].", ";
      }
      $this->shortArgumentList = substr($this->shortArgumentList, 0, -2);
    }
  }

Here is the caller graph for this function:

Construct the list of all possible ways to call the subject (function or method)

Definition at line 101 of file gtTestSubject.php.

                                          {
    $this->allowedArgumentLists[0] = '';
    if(count ($this->mandatoryArgumentNames) > 0) {
      for( $i = 0; $i < count( $this->mandatoryArgumentNames ); $i++) {
        $this->allowedArgumentLists[0] .= "\$".$this->mandatoryArgumentNames[$i].", ";
      }
    }
     
    if(count ($this->optionalArgumentNames) > 0) {
      for( $i = 0; $i < count( $this->optionalArgumentNames ); $i++) {
        $this->allowedArgumentLists[] = $this->allowedArgumentLists[$i]."\$".$this->optionalArgumentNames[$i].", ";
        $this->allowedArgumentLists[$i] = substr ($this->allowedArgumentLists[$i], 0, -2);
      }
    }

    $this->allowedArgumentLists[count($this->allowedArgumentLists) -1 ] = substr($this->allowedArgumentLists[count($this->allowedArgumentLists) -1 ], 0, -2);
  }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 10 of file gtTestSubject.php.

Definition at line 7 of file gtTestSubject.php.

Definition at line 14 of file gtTestSubject.php.

Definition at line 5 of file gtTestSubject.php.

Definition at line 12 of file gtTestSubject.php.

Definition at line 4 of file gtTestSubject.php.

Definition at line 8 of file gtTestSubject.php.


The documentation for this class was generated from the following file: