@@ 1228-1244 (lines=17) @@ | ||
1225 | /** |
|
1226 | * @return int[] ordered tuple: user id and tweet id |
|
1227 | */ |
|
1228 | private function loadTweetFixture() |
|
1229 | { |
|
1230 | $user = new User(); |
|
1231 | $tweet = new Tweet(); |
|
1232 | ||
1233 | $user->name = 'ocramius'; |
|
1234 | $tweet->content = 'The cat is on the table'; |
|
1235 | ||
1236 | $user->addTweet($tweet); |
|
1237 | ||
1238 | $this->em->persist($user); |
|
1239 | $this->em->persist($tweet); |
|
1240 | $this->em->flush(); |
|
1241 | $this->em->clear(); |
|
1242 | ||
1243 | return [$user->id, $tweet->id]; |
|
1244 | } |
|
1245 | ||
1246 | /** |
|
1247 | * @return int[] ordered tuple: user id and user list id |
|
@@ 1249-1265 (lines=17) @@ | ||
1246 | /** |
|
1247 | * @return int[] ordered tuple: user id and user list id |
|
1248 | */ |
|
1249 | private function loadUserListFixture() |
|
1250 | { |
|
1251 | $user = new User(); |
|
1252 | $userList = new UserList(); |
|
1253 | ||
1254 | $user->name = 'ocramius'; |
|
1255 | $userList->listName = 'PHP Developers to follow closely'; |
|
1256 | ||
1257 | $user->addUserList($userList); |
|
1258 | ||
1259 | $this->em->persist($user); |
|
1260 | $this->em->persist($userList); |
|
1261 | $this->em->flush(); |
|
1262 | $this->em->clear(); |
|
1263 | ||
1264 | return [$user->id, $userList->id]; |
|
1265 | } |
|
1266 | } |
|
1267 |