Magrathea PHP 2

TestsManager extends Singleton
in package

Class for handling and code generations

Table of Contents

Properties

$instance  : array<string|int, mixed>|null
$phpunit  : mixed
$tests  : mixed
tests format: [ "name", "folders", "success", "result" ]

Methods

__wakeup()  : mixed
AddMagrathaTests()  : mixed
AddTest()  : TestsManager
Add custom test
GetCacheDestination()  : string
GetMethodsFromTest()  : array<string|int, mixed>
Gets a file name and return the avaiable methods
GetRunExtras()  : string
GetTests()  : array<string|int, mixed>
Gets the array of tests
GetTestsFromFolder()  : array<string|int, mixed>
Gets a folder and returns the available test files
Initialize()  : mixed
Instance()  : static|Singleton
MockClass()  : static|Singleton
RunAllTests()  : mixed
Run all the tests
RunFile()  : array<string|int, mixed>
Runs a specific test file
RunFolder()  : array<string|int, mixed>
Run all the tests from a specific folder
RunFunction()  : array<string|int, mixed>
Runs a specific test function from a file
RunTestSuite()  : mixed
SetInstance()  : mixed
TestFolderPrint()  : mixed
__clone()  : mixed
__construct()  : mixed
createConfiguration()  : mixed
getCache()  : mixed
GetPhar()  : string
Gets a string with the location of the PHPUnit phar for running test

Properties

$instance

protected static array<string|int, mixed>|null $instance = []

$tests

tests format: [ "name", "folders", "success", "result" ]

private mixed $tests = []

Methods

AddTest()

Add custom test

public AddTest(array<string|int, mixed> $folders[, string $name = null ]) : TestsManager
Parameters
$folders : array<string|int, mixed>

folders

$name : string = null

name

Return values
TestsManager

itself

GetCacheDestination()

public GetCacheDestination() : string
Return values
string

GetMethodsFromTest()

Gets a file name and return the avaiable methods

public GetMethodsFromTest(string $fileName) : array<string|int, mixed>
Parameters
$fileName : string
Return values
array<string|int, mixed>

GetRunExtras()

public GetRunExtras() : string
Return values
string

GetTests()

Gets the array of tests

public GetTests() : array<string|int, mixed>
Return values
array<string|int, mixed>

$tests

GetTestsFromFolder()

Gets a folder and returns the available test files

public GetTestsFromFolder(string $folder) : array<string|int, mixed>
Parameters
$folder : string
Return values
array<string|int, mixed>

RunAllTests()

Run all the tests

public RunAllTests() : mixed

RunFile()

Runs a specific test file

public RunFile(string $file[, bool $debug = true ]) : array<string|int, mixed>
Parameters
$file : string

full path of file

$debug : bool = true

is this a full debug? (TODO)

Return values
array<string|int, mixed>

response

RunFolder()

Run all the tests from a specific folder

public RunFolder(string $folder[, bool $debug = false ]) : array<string|int, mixed>
Parameters
$folder : string

full path of folder

$debug : bool = false

is this a full debug? (TODO)

Return values
array<string|int, mixed>

response

RunFunction()

Runs a specific test function from a file

public RunFunction(string $file, string $fn[, bool $debug = true ]) : array<string|int, mixed>
Parameters
$file : string

full path of file

$fn : string

full name of function

$debug : bool = true

is this a full debug? (TODO)

Return values
array<string|int, mixed>

response

SetInstance()

public SetInstance(mixed $inst) : mixed
Parameters
$inst : mixed

TestFolderPrint()

public static TestFolderPrint(mixed $path) : mixed
Parameters
$path : mixed

__construct()

private final __construct() : mixed

createConfiguration()

private createConfiguration() : mixed

GetPhar()

Gets a string with the location of the PHPUnit phar for running test

private GetPhar([bool $debug = false ]) : string
Parameters
$debug : bool = false

should include debug param

Return values
string

phar code to be executed


        
On this page

Search results