Skip to content
Permalink
Browse files

Use assertCount() where applicable.

  • Loading branch information...
ADmad committed Jun 22, 2017
1 parent 9a47769 commit 196b5f2e2d1f6112d72d6e5c5c92ec52886e16ba
Showing with 9 additions and 6 deletions.
  1. +9 −6 tests/TestCase/ORM/QueryTest.php
@@ -2877,13 +2877,16 @@ public function testContainFinderHasMany()
]
]);
$this->assertSame(2, count($resultWithArticles->first()->articles));
$this->assertSame(2, count($resultWithArticlesArray->first()->articles));
$this->assertCount(2, $resultWithArticles->first()->articles);
$this->assertCount(2, $resultWithArticlesArray->first()->articles);
$this->assertSame(1, count($resultWithArticlesArrayOptions->first()->articles));
$this->assertSame('First Article', $resultWithArticlesArrayOptions->first()->articles[0]->title);
$this->assertCount(1, $resultWithArticlesArrayOptions->first()->articles);
$this->assertSame(
'First Article',
$resultWithArticlesArrayOptions->first()->articles[0]->title
);
$this->assertSame(0, count($resultWithoutArticles->first()->articles));
$this->assertCount(0, $resultWithoutArticles->first()->articles);
}
/**
@@ -2915,7 +2918,7 @@ public function testContainFinderHasManyClosure()
}
]);
$this->assertSame(2, count($resultWithArticles->first()->articles));
$this->assertCount(2, $resultWithArticles->first()->articles);
}
/**

0 comments on commit 196b5f2

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