Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Rabaix committed Aug 5, 2013
1 parent e9da5f2 commit d2da6ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Filter/Filter.php
Expand Up @@ -24,7 +24,7 @@ abstract class Filter extends BaseFilter
public function apply($queryBuilder, $value)
{
$this->value = $value;
if($value && $value["value"]) {
if(is_array($value) && array_key_exists("value", $value)) {
list($alias, $field) = $this->association($queryBuilder, $value);

$this->filter($queryBuilder, $alias, $field, $value);
Expand Down
4 changes: 2 additions & 2 deletions Tests/Filter/ModelFilterTest.php
Expand Up @@ -86,7 +86,7 @@ public function testAssociationWithInvalidMapping()

$builder = new ProxyQuery(new QueryBuilder);

$filter->apply($builder, 'asd');
$filter->apply($builder, array('value' => 'asd'));
}

/**
Expand All @@ -99,7 +99,7 @@ public function testAssociationWithValidMappingAndEmptyFieldName()

$builder = new ProxyQuery(new QueryBuilder);

$filter->apply($builder, 'asd');
$filter->apply($builder, array('value' => 'asd'));
$this->assertEquals(true, $filter->isActive());
}

Expand Down

0 comments on commit d2da6ce

Please sign in to comment.