@@ 245-253 (lines=9) @@ | ||
242 | /** |
|
243 | * @depends testDaoGeneration |
|
244 | */ |
|
245 | public function testAssigningNewBeans() |
|
246 | { |
|
247 | $userDao = new UserDao($this->tdbmService); |
|
248 | $countryBean = new CountryBean('Mexico'); |
|
249 | $userBean = new UserBean('Speedy Gonzalez', '[email protected]', $countryBean, 'speedy.gonzalez'); |
|
250 | $this->assertEquals($countryBean, $userBean->getCountry()); |
|
251 | ||
252 | $userDao->save($userBean); |
|
253 | } |
|
254 | ||
255 | /** |
|
256 | * @depends testAssigningNewBeans |
|
@@ 1402-1413 (lines=12) @@ | ||
1399 | /** |
|
1400 | * @depends testDaoGeneration |
|
1401 | */ |
|
1402 | public function testCyclicReferenceWithInheritance() |
|
1403 | { |
|
1404 | $userDao = new UserDao($this->tdbmService); |
|
1405 | ||
1406 | $country = new CountryBean('Norrisland'); |
|
1407 | $user = new UserBean('Chuck Norris', '[email protected]', $country, 'chuck.norris'); |
|
1408 | ||
1409 | $user->setManager($user); |
|
1410 | ||
1411 | $this->expectException(TDBMCyclicReferenceException::class); |
|
1412 | $userDao->save($user); |
|
1413 | } |
|
1414 | ||
1415 | /** |
|
1416 | * @depends testDaoGeneration |