mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Expose canUseMemory
This lets Fixture be used to create an actual persistent table with InnoDB engine instead of MEMORY.
This commit is contained in:
parent
c17cc39f08
commit
522b5048f8
1 changed files with 10 additions and 1 deletions
|
@ -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 @@ class CakeTestFixture {
|
|||
}
|
||||
|
||||
if (empty($this->fields['tableParameters']['engine'])) {
|
||||
$canUseMemory = true;
|
||||
$canUseMemory = $this->canUseMemory;
|
||||
foreach ($this->fields as $args) {
|
||||
|
||||
if (is_string($args)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue