whereComponent doesn't rely on the component object

This commit is contained in:
Samuel Georges 2015-10-09 05:32:24 +11:00
parent 4b50f1cdb7
commit 84a95af93b
2 changed files with 1 additions and 3 deletions

View File

@ -63,7 +63,7 @@ class CmsObjectCollection extends CollectionBase
* @param string $value
* @return static
*/
public function whereComponent($components, $property, $value, $strict = true)
public function whereComponent($components, $property, $value, $strict = false)
{
return $this->filter(function($object) use ($components, $property, $value, $strict) {

View File

@ -13,8 +13,6 @@ class CmsObjectQueryTest extends TestCase
public function testWhereComponent()
{
include_once base_path() . '/tests/fixtures/plugins/october/tester/components/Archive.php';
$pages = Page::whereComponent('testArchive', 'posts-per-page', '6');
$this->assertCount(1, $pages->all());