cakephp / 2.10.3 / class-caketestloader.html /

Class CakeTestLoader

TestLoader for CakePHP Test suite.

Turns partial paths used on the testsuite console and web UI into full file paths.

PHPUnit_Runner_StandardTestSuiteLoader
Extended by CakeTestLoader
Package: Cake\ TestSuite
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/TestSuite/CakeTestLoader.php

Method Summary

  • _basePath() protected static
    Generates the base path to a set of tests based on the parameters.
  • _getRecursiveFileList() protected static

    Gets a recursive list of files from a given directory and matches then against a given fileTestFunction, like isTestCaseFile()

  • _resolveTestFile() protected
    Convert path fragments used by CakePHP's test runner to absolute paths that can be fed to PHPUnit.
  • generateTestList() public static
    Get the list of files for the test listing.
  • load() public
    Load a file and find the first test case / suite in that file.

Method Detail

_basePath()source protected static

_basePath( array $params )

Generates the base path to a set of tests based on the parameters.

Parameters

array $params
The path parameters.

Returns

string
The base path.

_getRecursiveFileList()source protected static

_getRecursiveFileList( string $directory '.' )

Gets a recursive list of files from a given directory and matches then against a given fileTestFunction, like isTestCaseFile()

Parameters

string $directory optional '.'
The directory to scan for files.

Returns

array

_resolveTestFile()source protected

_resolveTestFile( string $filePath , string $params )

Convert path fragments used by CakePHP's test runner to absolute paths that can be fed to PHPUnit.

Parameters

string $filePath
The file path to load.
string $params
Additional parameters.

Returns

string
Converted path fragments.

generateTestList()source public static

generateTestList( string $params )

Get the list of files for the test listing.

Parameters

string $params
Path parameters

Returns

array

load()source public

load( string $filePath , string $params '' )

Load a file and find the first test case / suite in that file.

Parameters

string $filePath
The file path to load
string $params optional ''
Additional parameters

Returns

ReflectionClass

© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.10/class-CakeTestLoader.html