$article3->save();
$finder = new sfPropelFinder('Article');
$nbArticles = $finder->count();
$t->is($nbArticles, 2, 'delete() deletes records from the table and returns the number of deleted rows');
$nbDeleted = $finder->delete();
$t->is($nbDeleted, 2, 'delete() deletes records from the table and returns the number of deleted rows');
$nbArticles = $finder->count();
$t->is($nbArticles, 0, 'delete() on an empty finder deletes all rows');
$article2 = new Article();
$article2->setTitle('foo2');
$article2->save();
$article3 = new Article();
$article3->setTitle('foo3');
$article3->save();
$finder = new sfPropelFinder('Article');
$nbDeleted = $finder->where('Title', 'foo2')->delete();
$t->is($nbDeleted, 1, 'delete() deletes all rows found by a finder');
$nbArticles = $finder->count();
$t->is($nbArticles, 1, 'delete() does not delete rows not found by the finder');

$t->diag('where()');

ArticlePeer::doDeleteAll();
$article1 = new Article();
$article1->setTitle('abc');
$article1->save();
$article2 = new Article();
$article2->setTitle('def');
$article2->save();
$article3 = new Article();
$article3->setTitle('bbc');