Skip to content

Commit

Permalink
Update unit test to reveal cascade callback bug for aliased associations
Browse files Browse the repository at this point in the history
  • Loading branch information
PGBI committed Apr 15, 2015
1 parent 3a3de18 commit 358cad6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/TestCase/ORM/TableTest.php
Expand Up @@ -2411,7 +2411,9 @@ public function testDeleteDependent()
public function testDeleteDependentHasMany()
{
$table = TableRegistry::get('authors');
$table->hasMany('articles', [
$table->associations()->remove('articles');
$table->hasMany('aliased_articles', [
'className' => 'articles',
'foreignKey' => 'author_id',
'dependent' => true,
'cascadeCallbacks' => true,
Expand Down

0 comments on commit 358cad6

Please sign in to comment.