Skip to content

Commit

Permalink
Prevent accidental configuration of both model and table.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Jan 8, 2016
1 parent 81073ab commit 530def4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/TestSuite/Fixture/TestFixture.php
Expand Up @@ -200,6 +200,9 @@ protected function _schemaFromImport()
$import = $this->import + ['connection' => 'default', 'table' => null, 'model' => null];

if (!empty($import['model'])) {
if (!empty($import['table'])) {
throw new CakeException('You cannot define both table and model.');
}
$import['table'] = TableRegistry::get($import['model'])->table();
}

Expand Down

0 comments on commit 530def4

Please sign in to comment.