CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.9 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.9
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper
  • None

Classes

  • CakeTestCase
  • CakeTestLoader
  • CakeTestRunner
  • CakeTestSuite
  • CakeTestSuiteCommand
  • CakeTestSuiteDispatcher
  • ControllerTestCase
  • ControllerTestDispatcher
  • InterceptContentHelper

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. (http://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() 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() 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() 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() public static ¶

generateTestList( string $params )

Get the list of files for the test listing.

Parameters
string $params
Path parameters
Returns
array

load() 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
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs