Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Added unit test for Predicate::expression() with null $parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dvp-travis committed Sep 6, 2015
1 parent bd8ba72 commit 51863b7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/Sql/Predicate/PredicateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,19 @@ public function testExpression()
$predicate->getExpressionData()
);
}

/**
* @testdox Unit test: Test expression() allows null $parameters
*/
public function testExpressionNullParameters()
{
$predicate = new Predicate;

$predicate->expression('foo = bar');
$predicates = $predicate->getPredicates();
$expression = $predicates[0][1];
$this->assertEquals([null], $expression->getParameters());
}

/**
* @testdox Unit test: Test literal() is chainable, returns proper values, and is backwards compatible with 2.0.*
Expand Down

0 comments on commit 51863b7

Please sign in to comment.