Skip to content

Commit c41433f

Browse files
authored
Merge pull request #331 from lemoinem/fix/timestampable-tests
Fix Timestampable tests
2 parents 9cfefd5 + 88fbd6c commit c41433f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/Knp/DoctrineBehaviors/ORM/TimestampableTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function it_should_modify_update_datetime_when_updated_but_not_the_creati
6666

6767
$em->persist($entity);
6868
$em->flush();
69+
$em->refresh($entity);
6970
$id = $entity->getId();
7071
$createdAt = $entity->getCreatedAt();
7172
$em->clear();
@@ -99,6 +100,7 @@ public function it_should_return_the_same_datetime_when_not_updated()
99100

100101
$em->persist($entity);
101102
$em->flush();
103+
$em->refresh($entity);
102104
$id = $entity->getId();
103105
$createdAt = $entity->getCreatedAt();
104106
$updatedAt = $entity->getUpdatedAt();
@@ -135,6 +137,7 @@ public function it_should_modify_update_datetime_only_once()
135137

136138
$em->persist($entity);
137139
$em->flush();
140+
$em->refresh($entity);
138141
$id = $entity->getId();
139142
$createdAt = $entity->getCreatedAt();
140143
$em->clear();

0 commit comments

Comments
 (0)