@@ 244-252 (lines=9) @@ | ||
241 | /** |
|
242 | * @depends testDaoGeneration |
|
243 | */ |
|
244 | public function testAssigningNewBeans() |
|
245 | { |
|
246 | $userDao = new UserDao($this->tdbmService); |
|
247 | $countryBean = new CountryBean('Mexico'); |
|
248 | $userBean = new UserBean('Speedy Gonzalez', '[email protected]', $countryBean, 'speedy.gonzalez'); |
|
249 | $this->assertEquals($countryBean, $userBean->getCountry()); |
|
250 | ||
251 | $userDao->save($userBean); |
|
252 | } |
|
253 | ||
254 | /** |
|
255 | * @depends testAssigningNewBeans |
|
@@ 1332-1343 (lines=12) @@ | ||
1329 | /** |
|
1330 | * @depends testDaoGeneration |
|
1331 | */ |
|
1332 | public function testCyclicReferenceWithInheritance() |
|
1333 | { |
|
1334 | $userDao = new UserDao($this->tdbmService); |
|
1335 | ||
1336 | $country = new CountryBean('Norrisland'); |
|
1337 | $user = new UserBean('Chuck Norris', '[email protected]', $country, 'chuck.norris'); |
|
1338 | ||
1339 | $user->setManager($user); |
|
1340 | ||
1341 | $this->expectException(TDBMCyclicReferenceException::class); |
|
1342 | $userDao->save($user); |
|
1343 | } |
|
1344 | ||
1345 | /** |
|
1346 | * @depends testDaoGeneration |