Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions en/appendices/5-3-migration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ TestSuite
- ``assertRedirectBackToReferer()`` added to assert a successful redirect has been made to the referer URL.
- ``assertFlashMessageContains()`` and ``assertFlashMessageContainsAt()`` were added. These methods enable
substring matching of flash message content.
- ``TestFixture::$tableAlias`` was added. This property lets you define the
table alias that will be used to load an ``ORM\Table`` instance for a fixture.
This improves compatibility for schemas that do not closely follow naming conventions.

Utility
-------
Expand Down
13 changes: 12 additions & 1 deletion en/development/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,20 @@ in your **tests/Fixture** directory, with the following content::

class ArticlesFixture extends TestFixture
{
// Optional. Set this property to load fixtures to a different test datasource
// Optional. Set this property to load fixtures
// to a different test datasource
public $connection = 'test';

// Optional. Lets you define which table alias is used when
// reflecting schema and inserting rows. Inferred from the
// class name by default. Added in 5.3.0
public $tableAlias = 'Articles';

// Optional. Lets you define the table name for a fixture.
// If defined, this table name will be camelized to create
// $tableAlias.
public $table = 'articles';

public $records = [
[
'title' => 'First Article',
Expand Down
Loading