Lines Matching refs:function

69   $function = new gtFunction($name);
70 $function->setArgumentNames();
71 $function->setArgumentLists();
72 $function->setInitialisationStatements();
82 $testCase->setFunction($function);
95 $testCase->setFunction($function);
110 $testCaseContainer->setFunction($function);
128 * Class reperesents a single PHP function.
136 * Set the name of the name of the function
140 public function __construct($functionName) {
146 * Get the names of function arguments and initialise mandatory and optional argument arrays
149 public function setArgumentNames() {
150 $function= new ReflectionFunction($this->functionName);
152 foreach ($function->getParameters() as $i => $param) {
163 * Return the name of the function
167 public function getName() {
187 public static function get($name) {
260 -f function_name ................. Name of PHP function, eg cos
275 Please supply a function or method name to be tested.
278 The function name is not a valid PHP function name.
279 Check that the extension containing the function is loaded.
296 public static function get($name) {
319 public static function append($name, $array) {
342 public static function appendBlankLines($numberOfLines, $array) {
379 public static function init()
406 public static function autoload($class)
441 protected function isShortOption($arg)
446 public function isValidOptionArg($array, $index) {
455 public function parse($argv)
492 public function getOption($option)
504 public function hasOption($option)
514 * Check that the function name is valid
519 public function check( $clo) {
521 $function = $clo->getOption('f');
523 if( in_array( $function, $functions['internal'] ) ) {
531 public function getMessage() {
543 public function check( $clo) {
551 public function getMessage() {
563 public function check( $clo) {
573 public function getMessage() {
581 * Check that either a method or a function is specified
586 public function check( $clo) {
594 public function getMessage() {
606 public function check( $clo) {
621 public function getMessage() {
633 public function check( $clo) {
644 public function getMessage() {
670 public function check($clo) {
694 public function setOptions($commandLineOptions) {
720 public function getOptions() {
725 public function getSkipifKey() {
729 public function getSkipifExt() {
733 public function hasSkipif() {
737 public function hasSkipifKey() {
744 public function hasSkipifExt() {
750 public function hasIni() {
754 public function hasClean() {
758 public function hasDone() {
797 abstract public function check($clo);
799 abstract public function getMessage();
810 public static function write($name, $string, $type, $count = 0) {
849 public function __construct($className, $methodName) {
859 public function setConstructorArgumentNames() {
874 public function setArgumentNames() {
895 public function getConstructorArgumentNames() {
904 public function getName() {
914 public function getClassName() {
922 public function setConstructorArgumentList() {
938 public function getConstructorArgumentList() {
947 public function setConstructorInitStatements() {
962 public function getConstructorInitStatements() {
1010 );function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
1022 public function __toString() {
1059 public function getMandatoryArgumentNames() {
1069 public function getOptionalArgumentNames() {
1073 public function setArgumentLists() {
1083 public function setExtraArgumentList() {
1101 * Return the list of arguments as it appears in the function call
1105 public function getExtraArgumentList() {
1111 * Set the list of function arguments to be one less that the number of mandatory arguments
1114 public function setShortArgumentList() {
1130 public function getShortArgumentList() {
1136 * Construct the list of all possible ways to call the subject (function or method)
1139 public function setValidArgumentLists() {
1159 * Return the array of all possible sets of method/function arguments
1163 public function getValidArgumentLists() {
1173 public function getMaximumArgumentList() {
1182 public function setInitialisationStatements() {
1200 public function getInitialisationStatements() {
1213 public function __construct($osl) {
1223 public function setMethod(gtMethod $method) {
1232 public function constructAll() {
1256 public function __construct($opt) {
1265 public function setMethod($method) {
1269 public function constructTestCase() {
1283 public function testHeader() {
1289 public function subjectCalls() {
1313 * Return instance of either method or function error test case
1318 public static function getInstance($optionalSections, $type = 'function') {
1320 if($type == 'function') {
1329 public function getShortArgumentList() {
1333 public function getLongArgumentList() {
1337 public function constructSubjectCalls() {
1346 public function addErrorEcho() {
1347 …$this->testCase[] = "echo \"*** Test by calling method or function with incorrect numbers of argum…
1361 * The subject of the test, may be either a function (gtFunction) or a method (gtMethod)
1389 public function toString() {
1404 public function getTestCase() {
1413 public function ConstructCommonHeaders() {
1432 public function ConstructCommonClosing() {
1450 public function fileOpening() {
1461 public function constructorArgInit() {
1473 public function constructorCreateInstance() {
1481 * Add function or method initilaisation statements to the test case
1484 public function argInit() {
1497 public function fileClosing() {
1506 public function addSkipif() {
1540 public function addIni() {
1550 public function addClean() {
1561 public function addDone() {
1570 public function addExpectf() {
1577 public function getOpt() {
1584 * Basic test case for a PHP function
1590 public function __construct($opt) {
1595 * Set the function name
1597 * @param gtFunction $function
1599 public function setFunction($function) {
1600 $this->subject = $function;
1603 public function constructTestCase() {
1619 public function testHeader() {
1622 …$this->testCase[] = "Test function ".$this->subject->getName()."() by calling it with its expected…
1626 * Add the test section to call the function
1629 public function subjectCalls() {
1630 // Construct the argument list to pass to the function being tested
1645 * Error test case for a PHP function
1650 public function __construct($opt) {
1655 * Set the function name
1657 * @param string $function
1659 public function setFunction($function) {
1660 $this->subject = $function;
1668 public function constructTestCase() {
1680 public function testHeader() {
1682 …$this->testCase[] = "Test function ".$this->subject->getName()."() by calling it more than or less…
1685 public function subjectCalls() {
1686 // Construct the argument lists to pass to the function being tested
1701 * Class for variation tests for a PHP function
1709 public function __construct($opt) {
1715 * @param gtfunction $function
1719 public function setUp(gtfunction $function, $argumentNumber, $variationData) {
1720 $this->subject = $function;
1731 public function constructTestCase() {
1741 public function testHeader() {
1743 …$this->testCase[] = "Test function ".$this->subject->getName()."() by substituting argument ".$thi…
1747 public function subjectCalls() {
1750 // Construct the argument list to pass to the function being tested
1768 protected $function;
1771 public function __construct($osl) {
1776 * Sets function being tested
1778 * @param gtFunction $function
1780 public function setFunction(gtFunction $function) {
1781 $this->function = $function;
1789 public function constructAll() {
1792 …$numberOfArguments = count($this->function->getMandatoryArgumentNames()) + count($this->function->…
1796 $testCase->setUp($this->function, $i, $d);
1811 public function __construct($opt) {
1821 public function setMethod($method) {
1830 public function constructTestCase() {
1843 public function testHeader() {
1848 public function subjectCalls() {
1873 * Returns an instance of a test case for a method or a function
1878 public static function getInstance($optionalSections, $type = 'function') {
1879 if($type == 'function') {
1887 public function constructSubjectCalls() {
1892 public function addBasicEcho() {
1893 …$this->testCase[] = "echo \"*** Test by calling method or function with its expected arguments ***…
1919 * Return an instance of a containers for either function or method tests
1924 public static function getInstance ($optionalSections, $type = 'function') {
1926 if($type == 'function') {
1936 public function constructAll() {
1945 public function getVariationTests() {
1961 * Returns an instance of a test case for a method or a function
1966 public static function getInstance($optionalSections, $type = 'function') {
1968 if($type == 'function') {
1977 public function argInitVariation() {
1987 public function addVariationCode() {
1992 public function constructSubjectCalls() {
1998 public function addVariationEcho() {
2016 public function __construct($opt) {
2027 public function setUp(gtMethod $method, $argumentNumber, $variationData) {
2038 public function constructTestCase() {
2051 public function testHeader() {
2056 public function subjectCalls() {