Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add info about autoFixtures and loadFixtures

  • Loading branch information...
commit fdf18d506e2b0e6cfe4a17af6b5e957781454c2a 1 parent bef1459
@shama shama authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 en/development/testing.rst
14 en/development/testing.rst
@@ -479,6 +479,20 @@ Fixture directory. You can also load fixtures from CakePHP core, or plugins::
Using the ``core`` prefix will load fixtures from CakePHP, and using a plugin
name as the prefix, will load the fixture from the named plugin.
+You can control when your fixtures are loaded by setting
+:php:attr:`CakeTestCase::$autoFixtures` to ``false`` and later load them using
+ <?php
+ class ArticleTest extends CakeTestCase {
+ public $fixtures = array('app.article', 'app.comment');
+ public $autoFixtures = false;
+ public function testMyFunction() {
+ $this->loadFixtures('Article', 'Comment');
+ }
+ }
Testing Models
Please sign in to comment.
Something went wrong with that request. Please try again.