CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Team
    • Issues (Github)
    • YouTube Channel
    • Get Involved
    • Bakery
    • Featured Resources
    • Newsletter
    • Certification
    • My CakePHP
    • CakeFest
    • Facebook
    • Twitter
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 3.8 Red Velvet API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 3.8
      • 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

  • Cake
    • Auth
      • Storage
    • Cache
      • Engine
    • Collection
      • Iterator
    • Command
    • Console
      • Exception
    • Controller
      • Component
      • Exception
    • Core
      • Configure
        • Engine
      • Exception
      • Retry
    • Database
      • Driver
      • Exception
      • Expression
      • Schema
      • Statement
      • Type
    • Datasource
      • Exception
    • Error
      • Middleware
    • Event
      • Decorator
    • Filesystem
    • Form
    • Http
      • Client
        • Adapter
        • Auth
      • Cookie
      • Exception
      • Middleware
      • Session
    • I18n
      • Formatter
      • Middleware
      • Parser
    • Log
      • Engine
    • Mailer
      • Exception
      • Transport
    • Network
      • Exception
    • ORM
      • Association
      • Behavior
        • Translate
      • Exception
      • Locator
      • Rule
    • Routing
      • Exception
      • Filter
      • Middleware
      • Route
    • Shell
      • Helper
      • Task
    • TestSuite
      • Fixture
      • Stub
    • Utility
      • Exception
    • Validation
    • View
      • Exception
      • Form
      • Helper
      • Widget
  • None

Classes

  • ConnectionManager
  • ConnectionRegistry
  • FactoryLocator
  • Paginator
  • QueryCacher
  • ResultSetDecorator
  • RulesChecker

Interfaces

  • ConnectionInterface
  • EntityInterface
  • FixtureInterface
  • InvalidPropertyInterface
  • PaginatorInterface
  • QueryInterface
  • RepositoryInterface
  • ResultSetInterface
  • SchemaInterface
  • TableSchemaInterface

Traits

  • EntityTrait
  • ModelAwareTrait
  • QueryTrait
  • RulesAwareTrait

Interface FixtureInterface

Defines the interface that testing fixtures use.

Direct Implementers
  • Cake\TestSuite\Fixture\TestFixture
Namespace: Cake\Datasource
Location: Datasource/FixtureInterface.php

Method Summary

  • connection() public
    Get the connection name this fixture should be inserted into.
  • create() public
    Create the fixture schema/mapping/definition
  • createConstraints() public

    Build and execute SQL queries necessary to create the constraints for the fixture

  • drop() public
    Run after all tests executed, should remove the table/collection from the connection.
  • dropConstraints() public

    Build and execute SQL queries necessary to drop the constraints for the fixture

  • insert() public
    Run before each test is executed.
  • sourceName() public
    Get the table/collection name for this fixture.
  • truncate() public
    Truncates the current fixture.

Method Detail

connection() public ¶

connection( )

Get the connection name this fixture should be inserted into.

Returns
string

create() public ¶

create( Cake\Datasource\ConnectionInterface $db )

Create the fixture schema/mapping/definition

Parameters
Cake\Datasource\ConnectionInterface $db
An instance of the connection the fixture should be created on.
Returns
boolean
True on success, false on failure.

createConstraints() public ¶

createConstraints( Cake\Datasource\ConnectionInterface $db )

Build and execute SQL queries necessary to create the constraints for the fixture

Parameters
Cake\Datasource\ConnectionInterface $db
An instance of the database into which the constraints will be created
Returns
boolean
on success or if there are no constraints to create, or false on failure

drop() public ¶

drop( Cake\Datasource\ConnectionInterface $db )

Run after all tests executed, should remove the table/collection from the connection.

Parameters
Cake\Datasource\ConnectionInterface $db
An instance of the connection the fixture should be removed from.
Returns
boolean
True on success, false on failure.

dropConstraints() public ¶

dropConstraints( Cake\Datasource\ConnectionInterface $db )

Build and execute SQL queries necessary to drop the constraints for the fixture

Parameters
Cake\Datasource\ConnectionInterface $db
An instance of the database into which the constraints will be dropped
Returns
boolean
on success or if there are no constraints to drop, or false on failure

insert() public ¶

insert( Cake\Datasource\ConnectionInterface $db )

Run before each test is executed.

Should insert all the records into the test database.

Parameters
Cake\Datasource\ConnectionInterface $db
An instance of the connection into which the records will be inserted.
Returns
Cake\Database\StatementInterface|boolean
on success or if there are no records to insert, or false on failure.

sourceName() public ¶

sourceName( )

Get the table/collection name for this fixture.

Returns
string

truncate() public ¶

truncate( Cake\Datasource\ConnectionInterface $db )

Truncates the current fixture.

Parameters
Cake\Datasource\ConnectionInterface $db
A reference to a db instance
Returns
boolean
Follow @CakePHP
#IRC
OpenHub
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Logos & Trademarks
  • Community
  • Team
  • Issues (Github)
  • YouTube Channel
  • Get Involved
  • Bakery
  • Featured Resources
  • Newsletter
  • Certification
  • My CakePHP
  • CakeFest
  • Facebook
  • Twitter
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs