/** * Adds the given expression as a filter to this query. * * @since 0.3 * * @param string $expression * @return self * @throws InvalidArgumentException */ public function filter($expression) { $this->graphBuilder->filter($expression); return $this; }
public function testFilter_invalidExpression() { $graphBuilder = new GraphBuilder(new UsageValidator()); $this->setExpectedException('InvalidArgumentException'); $graphBuilder->filter('FooBar'); }