whereComponent doesn't rely on the component object
This commit is contained in:
parent
4b50f1cdb7
commit
84a95af93b
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue