Skip to content
Permalink
Browse files

Added assertions for strategy option.

  • Loading branch information...
robertpustulka committed Sep 30, 2016
1 parent 79d24b9 commit dd65efef55d41ee084236b400024ac8f358086a6
Showing with 6 additions and 1 deletion.
  1. +6 −1 tests/TestCase/ORM/Association/BelongsToManyTest.php
@@ -137,7 +137,8 @@ public function testJunction()
{
$assoc = new BelongsToMany('Test', [
'sourceTable' => $this->article,
'targetTable' => $this->tag
'targetTable' => $this->tag,
'strategy' => 'subquery'
]);
$junction = $assoc->junction();
$this->assertInstanceOf('Cake\ORM\Table', $junction);
@@ -165,6 +166,10 @@ public function testJunction()
$assoc->junction('ArticlesTags');
$this->assertSame($junction, $assoc->junction());
$this->assertSame($assoc->strategy(), $this->tag->association('Articles')->strategy());
$this->assertSame($assoc->strategy(), $this->tag->association('ArticlesTags')->strategy());
$this->assertSame($assoc->strategy(), $this->article->association('ArticlesTags')->strategy());
}
/**

0 comments on commit dd65efe

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