public function theSiteHasFollowingOrganizations(TableNode $table)
{
$entityManager = $this->getEntityManager();
$this->organizations = array();
foreach ($table->getHash() as $row) {
$organization = new Entity\Organization();
$organization->fromArray(array('name' => $row['name'], 'score' => isset($row['score']) ? $row['score'] : 0));
$entityManager->persist($organization);
$this->organizations[$organization->getName()] = $organization;
}
$entityManager->flush();
}