Skip to content
Permalink
Browse files

Expose canUseMemory

This lets Fixture be used to create an actual persistent table with InnoDB engine instead of MEMORY.
  • Loading branch information...
HaroldPutman committed Mar 28, 2014
1 parent c17cc39 commit 522b5048f82ac9a00d66decabdf614296ca3a19a
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/Cake/TestSuite/Fixture/CakeTestFixture.php
@@ -81,6 +81,15 @@ class CakeTestFixture {
*/
public $primaryKey = null;
/**
* Fixture data can be stored in memory by default.
* When table is created for a fixture the MEMORY engine is used
* where possible. Set $canUseMemory to false if you don't want this.
*
* @var array
*/
public $canUseMemory = true;
/**
* Instantiate the fixture.
*
@@ -199,7 +208,7 @@ public function create($db) {
}
if (empty($this->fields['tableParameters']['engine'])) {
$canUseMemory = true;
$canUseMemory = $this->canUseMemory;
foreach ($this->fields as $args) {
if (is_string($args)) {

0 comments on commit 522b504

Please sign in to comment.
You can’t perform that action at this time.