AloFramework documentation
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Namespaces

  • Alo
    • Cache
    • CLI
    • Controller
    • Db
    • Exception
    • FileSystem
    • Session
    • Statics
    • Test
    • Validators
    • Windows
  • Controller
  • None
  • PHP

Classes

  • AbstractTester
  • ClassTester
  • FunctionTester

Class AbstractTester

The abstract tester class

Direct known subclasses

Alo\Test\ClassTester, Alo\Test\FunctionTester

Abstract
Namespace: Alo\Test
Package: TestingSuite
Deprecated: Since v1.1
Author: Art <a.molcanovas@gmail.com>
Located at sys/class/alo/test/abstracttester.php

Methods summary

public
# __construct( )

Instantiates the tester

Instantiates the tester

Author

Art <a.molcanovas@gmail.com>
public array
# runTests( )

Runs the tests

Runs the tests

Returns

array
Test results

Author

Art <a.molcanovas@gmail.com>
protected Alo\Test\AbstractTester
# runTest( array $test )

Runs an individual test

Runs an individual test

Parameters

$test
array
$test The test specs

Returns

Alo\Test\AbstractTester

Author

Art <a.molcanovas@gmail.com>
abstract protected array|string
# getCallable( string $name )

Returns the callable parameter for call_user_func_array()

Returns the callable parameter for call_user_func_array()

Parameters

$name
string
$name Function/method name

Returns

array|string

Author

Art <a.molcanovas@gmail.com>
public Alo\Test\AbstractTester
# addOutputTest( string $name, mixed $outcome, array $args = [] )

Adds a test for the output

Adds a test for the output

Parameters

$name
string
$name The method/function name
$outcome
mixed
$outcome The expected outcome
$args
array
$args The arguments to pass on to the function/method

Returns

Alo\Test\AbstractTester

Throws

Alo\Exception\TesterException
When the method/function name is invalid

Author

Art <a.molcanovas@gmail.com>
protected Alo\Test\AbstractTester
# addGenericTest( string $type, string $name, mixed $outcome, array $args = [] )

Adds a test for the output

Adds a test for the output

Parameters

$type
string
$type The type of the test - see this class' T_* constants
$name
string
$name The method/function name
$outcome
mixed
$outcome The expected outcome
$args
array
$args The arguments to pass on to the function/method

Returns

Alo\Test\AbstractTester

Throws

Alo\Exception\TesterException
When the method/function name is invalid

Author

Art <a.molcanovas@gmail.com>
public Alo\Test\AbstractTester
# addReturnTest( string $name, mixed $outcome, array $args = [] )

Adds a test for the return value

Adds a test for the return value

Parameters

$name
string
$name The method/function name
$outcome
mixed
$outcome The expected outcome
$args
array
$args The arguments to pass on to the function/method

Returns

Alo\Test\AbstractTester

Throws

Alo\Exception\TesterException
When the method/function name is invalid

Author

Art <a.molcanovas@gmail.com>
public array
# getQueue( )

Returns the common queue

Returns the common queue

Returns

array
public array
# getResults( )

Returns the testing results

Returns the testing results

Returns

array

Author

Art <a.molcanovas@gmail.com>
public string
# toPlaintextString( )

Returns the test results as plaintext

Returns the test results as plaintext

Returns

string

Author

Art <a.molcanovas@gmail.com>
public string
# __toString( )

Returns the test results in an HTML table

Returns the test results in an HTML table

Returns

string
HTML code

Author

Art <a.molcanovas@gmail.com>

Magic methods summary

Constants summary

string P_NAME 'name'
#

Defines a parameter as "name"

Defines a parameter as "name"

string P_ARGS 'args'
#

Defines a parameter as "arguments"

Defines a parameter as "arguments"

string P_OUTCOME 'outcome'
#

Defines a parameter as "expected outcome"

Defines a parameter as "expected outcome"

string P_TYPE 'type'
#

Defines a parameter as "type"

Defines a parameter as "type"

string P_DEFINITION 'definition'
#

Defines a parameter as "definition"

Defines a parameter as "definition"

string P_PASSED 'passed'
#

Defines a parameter as "passed"

Defines a parameter as "passed"

string T_OUTPUT 'output'
#

Defines the test type as "output test"

Defines the test type as "output test"

string T_RETURN 'return'
#

Defines the test type as "return test"

Defines the test type as "return test"

string O_NOT_CALLABLE 'Not callable'
#

Defines an outcome as "method/function not callable"

Defines an outcome as "method/function not callable"

string P_TEST_START 'start'
#

Defines a parameter as "start of test"

Defines a parameter as "start of test"

string P_TEST_END 'end'
#

Defines a parameter as "end of test"

Defines a parameter as "end of test"

string P_TEST_RUNTIME 'runtime'
#

Defines a parameter as "test runtime"

Defines a parameter as "test runtime"

Properties summary

protected array $queue
#

The test queue

The test queue

protected array $results
#

The test results

The test results

AloFramework documentation API documentation generated by ApiGen 2.8.0