$finder = new sfPropelFinder('Article');
$articles = $finder->findPk(array($article2->getId(), $article1->getId()));
$t->ok(is_array($articles), 'findPk() returns an array of objects when passed an array of primary keys');
$t->is(count($articles), 2, 'findPk() returns the objects with the primary keys matching the arguments');

$article = $finder->with('Category')->findPk($article2->getId());
$t->cmp_ok(strpos($finder->getLatestQuery(), 'SELECT article.ID, article.TITLE, article.CATEGORY_ID, category.ID, category.NAME FROM article INNER JOIN category'), '===', 0, 'findPk() is compatible with with()');

ArticlePeer::doDeleteAll();

$article1 = new Article();
$article1->setTitle('foo');
$article1->setCulture('fr');
$article1->setContent('Bar');
$article1->save();
$articlei18n1 = $article1->getCurrentArticleI18n();
try
{
  $articleI18n = sfPropelFinder::from('ArticleI18n')->findPk($articlei18n1->getId());
  $t->fail('findPk() expects an array of values for objects with composite primary keys');
}
catch(Exception $e)
{
  $t->pass('findPk() expects an array of values for objects with composite primary keys');
}
$articleI18n = sfPropelFinder::from('ArticleI18n')->findPk(array($articlei18n1->getId(), $articlei18n1->getCulture()));
$t->ok($articleI18n->equals($articlei18n1), 'findPk() retrieves objects with composite primary keys based on an array of Pks');

$t->diag('Instanciation possibilities');

ArticlePeer::doDeleteAll();