/**
  * Test related methods
  */
 public function testGuessUpdates()
 {
     $category = new Category();
     $translation = new CategoryTranslation();
     $translation->setLocale('en_US');
     $translation->setForeignKey($category);
     $guesser = new TranslationsUpdateGuesser(array('Pim\\Bundle\\CatalogBundle\\Entity\\Category'));
     $em = $this->getEntityManagerMock();
     $updates = $guesser->guessUpdates($em, $translation, UpdateGuesserInterface::ACTION_UPDATE_ENTITY);
     $this->assertEquals(1, count($updates));
     $this->assertEquals($category, $updates[0]);
 }
 /**
  * {@inheritDoc}
  */
 public function setForeignKey($foreignKey)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setForeignKey', array($foreignKey));
     return parent::setForeignKey($foreignKey);
 }