'CategoryId' => '1' ))->find(); $t->is($finder->getLatestQuery(), $query, 'filter() calls filterBy() on each condition'); $finder = new sfDoctrineFinder('DArticle'); $articles = $finder->filter(array( 'title' => '*foo*', 'category_id' => '1' ), true)->find(); $t->is($finder->getLatestQuery(), $query, 'filter() converts underscore column names to CamelCase when the second argument is true'); $finder = new sfDoctrineFinder('DArticle'); $finder->filter(array( 'Title' => '*foo*', 'CategoryId' => '1' ), false, array('Title'))->find(); $t->is($finder->getLatestQuery(), 'SELECT d.id AS d__id, d.title AS d__title, d.category_id AS d__category_id FROM d_article d WHERE d.title LIKE \'%foo%\'', 'filter() ignores column names that are not part of the third argument if passed'); $called = false; class myArticleFinder extends DbFinder { protected $class = 'DArticle'; public function filterByTitle($value) { global $called; $called = $value; }