/**
* @Given /^the site has following bundles:$/
*/
public function theSiteHasFollowingBundles(TableNode $table)
{
$entityManager = $this->getEntityManager();
foreach ($table->getHash() as $row) {
$user = $this->users[$row['username']];
$bundle = new Entity\Bundle();
$bundle->fromArray(array('name' => $row['name'], 'user' => $user, 'username' => $user->getName(), 'description' => $row['description'], 'lastCommitAt' => new \DateTime($row['lastCommitAt'])));
$bundle->setScore($row['score']);
$this->setPrivateProperty($bundle, "trend1", $row['trend1']);
$entityManager->persist($bundle);
}
$entityManager->flush();
}