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 Fixture

Namespaces

  • Cake\TestSuite\Fixture\Extension

Interfaces

  • FixtureStrategyInterface

    Base interface for strategies used to manage fixtures for TestCase.

Classes

  • DeleteStrategy

    Fixture strategy that deletes all rows from the fixture tables at the end of test.

    A drop-in alternative to {@link \Cake\TestSuite\Fixture\TruncateStrategy}: fixtures are inserted before each test and the tables are emptied afterwards, without a wrapping transaction, so afterCommit listeners behave as they do in the application.

    TRUNCATE is a DDL statement, and on most database servers it does more work than removing the rows - InnoDB for example drops and recreates the tablespace of every table it is issued against. Deleting the handful of rows a fixture holds is usually a lot cheaper, so test suites with many fixtures can spend noticeably less time in teardown with this strategy.

    The trade off is that DELETE does not reset auto increment counters. Fixtures whose records omit their primary key, and which other fixtures or assertions then refer to by id, need that counter to start from 1 in every test and have to keep using TruncateStrategy.

    Unlike TRUNCATE, DELETE is subject to foreign keys on every driver, so the rows are removed with the constraints disabled and the order of the fixtures does not matter.

  • FixtureHelper

    Helper for managing fixtures.

  • SchemaLoader

    Create test database schema from one or more SQL dump files.

    This class can be useful to create test database schema when your schema is managed by tools external to your CakePHP application.

    It is not well suited for applications/plugins that need to support multiple database platforms. You should use migrations for that instead.

  • TestFixture

    Cake TestFixture is responsible for building and destroying tables to be used during testing.

  • TransactionStrategy

    Fixture strategy that wraps fixtures in a transaction that is rolled back after each test.

    Any test that calls Connection::rollback(true) will break this strategy.

  • TruncateStrategy

    Fixture strategy that truncates all fixture tables at the end of test.

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