public function testResolveAnyMixedAttributesScopeForSearchModelFromSourceData() { $model = new AAASearchFormTestModel(new AAA()); $dataCollection = new SavedSearchAttributesDataCollection($model); $getArrayName = 'someArray'; $dataCollection->resolveAnyMixedAttributesScopeForSearchModelFromSourceData(); $this->assertNull($model->getAnyMixedAttributesScope()); //Test passing a value in the GET $_GET['AAASearchFormTestModel'][SearchForm::ANY_MIXED_ATTRIBUTES_SCOPE_NAME] = 'notAnArray'; $dataCollection->resolveAnyMixedAttributesScopeForSearchModelFromSourceData(); $this->assertNull($model->getAnyMixedAttributesScope()); $_GET['AAASearchFormTestModel'][SearchForm::ANY_MIXED_ATTRIBUTES_SCOPE_NAME] = array('All'); $dataCollection->resolveAnyMixedAttributesScopeForSearchModelFromSourceData(); $this->assertNull($model->getAnyMixedAttributesScope()); $_GET['AAASearchFormTestModel'][SearchForm::ANY_MIXED_ATTRIBUTES_SCOPE_NAME] = array('A', 'B', 'C'); $dataCollection->resolveAnyMixedAttributesScopeForSearchModelFromSourceData(); $this->assertEquals(array('A', 'B', 'C'), $model->getAnyMixedAttributesScope()); }