public function testUpdate()
 {
     $testEntity = TimeZoneTest::createTestTimeZone();
     self::$entityManager->persist($testEntity);
     self::$entityManager->flush();
     $this->assertNotEquals('fubar', $testEntity->getName());
     $testEntity->setName('fubar');
     TimeZoneService::update();
     $entities = self::$entityManager->createQuery('SELECT e FROM Rexmac\\Zyndax\\Entity\\TimeZone e')->execute();
     $this->assertEquals('fubar', $entities[0]->getName());
 }
Exemple #2
0
 public static function createTestUserProfile(User $user = null)
 {
     self::$testData['user'] = UserTest::createTestUser();
     $socialNetworkIdentity = UserSocialNetworkIdentityTest::createTestIdentity();
     self::$testData['socialNetworkIdentities'] = new ArrayCollection(array($socialNetworkIdentity));
     self::$testData['timeZone'] = TimeZoneTest::createTestTimeZone();
     $testData = self::$testData;
     if (null !== $user) {
         $testData['user'] = $user;
     }
     return new UserProfile($testData);
 }