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
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 6.0 API

  • Project:
    • CakePHP
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 6.0
      • 6.0
      • 5.4
      • 5.3
      • 5.2
      • 5.1
      • 5.0
      • 4.6
      • 4.5
      • 4.4
      • 4.3
      • 4.2
      • 4.1
      • 4.0
      • 3.10
      • 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

Namespaces

  • Global
  • Cake
    • AttributeResolver
    • Cache
    • Collection
    • Command
    • Console
    • Container
    • Controller
    • Core
    • Database
    • Datasource
    • Error
    • Event
    • Form
    • Http
    • I18n
    • Lock
    • Log
    • Mailer
    • Network
    • ORM
    • Routing
    • TestSuite
    • Utility
    • Validation
    • View

Namespace TestSuite

Namespaces

  • Cake\TestSuite\Constraint
  • Cake\TestSuite\Fixture
  • Cake\TestSuite\Stub

Function Detail

enablePluginLoadingForTests() ΒΆ

enablePluginLoadingForTests(string|null $configPath = null): void

Helper function to load plugin configuration for tests.

This function reads plugin configuration from a plugins.php file and stores it in the application configuration for later use by test cases.

Usage:

// In your tests/bootstrap.php file:
\Cake\TestSuite\enablePluginLoadingForTests();
Parameters
string|null $configPath optional

The path to the config directory. Defaults to CONFIG.

Returns
void
Throws
RuntimeException
When the plugins.php file returns invalid data

Classes

  • ConnectionHelper

    Helper for managing test connections

  • FsFixture

    Materializes a directory tree under a real temporary directory so tests can exercise real iterators against a known fixture layout.

  • MiddlewareDispatcher

    Dispatches a request capturing the response for integration testing purposes into the Cake\Http stack.

  • TestCase

    Cake TestCase class

  • TestEmailTransport

    TestEmailTransport

    Set this as the email transport to capture emails for later assertions

  • TestSession

    Read only access to the session during testing.

Traits

  • EmailTrait

    Make assertions on emails sent through the Cake\TestSuite\TestEmailTransport

    After adding the trait to your test case, all mail transports will be replaced with TestEmailTransport which is used for making assertions and will not actually send emails.

  • IntegrationTestTrait

    A trait intended to make integration tests of your controllers easier.

    This test class provides a number of helper methods and features that make dispatching requests and checking their responses simpler. It favours full integration tests over mock objects as you can test more of your code easily and avoid some of the maintenance pitfalls that mock objects create.

  • LogTestTrait

    Make assertions on logs

  • PHPUnitConsecutiveTrait
  • StringCompareTrait

    Compare a string to the contents of a file

    Implementing objects are expected to modify the $compareBasePath property before use.

OpenHub
Pingping
Linode
  • 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
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs