catch (Exception $e) { $throwException = true; } $t->ok($throwException, 'getColumnType() throws an exception when its argument is not the name of a column of the main finder object'); $column = $finder->getColumnType('Title'); $t->isa_ok($column, 'string', 'getColumnType() returns a string representing a sfModelFinder column type'); $t->is($column, sfModelFinderColumn::STRING, 'getColumnType() correctly matches VARCHAR column types to sfModelFinderColumn::STRING'); $column = $finder->getColumnType('CategoryId'); $t->is($column, sfModelFinderColumn::INTEGER, 'getColumnType() correctly matches INTEGER column types to sfModelFinderColumn::INTEGER'); $finder = new sfPropelFinder('Civility'); $column = $finder->getColumnType('IsMan'); $t->is($column, sfModelFinderColumn::BOOLEAN, 'getColumnType() correctly matches BOOLEAN column types to sfModelFinderColumn::BOOLEAN'); /******************************/ /* sfPropelFinder::filterBy() */ /******************************/ $t->diag('sfPropelFinder::filterBy()'); $finder = new sfPropelFinder('Article'); $c = $finder->filterBy('Title', 'foo')->getCriteria(); $expectedC = new Criteria(); $expectedC->add(ArticlePeer::TITLE, 'foo', Criteria::EQUAL);