|
@@ 246-254 (lines=9) @@
|
| 243 |
|
/** |
| 244 |
|
* @depends testDaoGeneration |
| 245 |
|
*/ |
| 246 |
|
public function testAssigningNewBeans() |
| 247 |
|
{ |
| 248 |
|
$userDao = new UserDao($this->tdbmService); |
| 249 |
|
$countryBean = new CountryBean('Mexico'); |
| 250 |
|
$userBean = new UserBean('Speedy Gonzalez', '[email protected]', $countryBean, 'speedy.gonzalez'); |
| 251 |
|
$this->assertEquals($countryBean, $userBean->getCountry()); |
| 252 |
|
|
| 253 |
|
$userDao->save($userBean); |
| 254 |
|
} |
| 255 |
|
|
| 256 |
|
/** |
| 257 |
|
* @depends testAssigningNewBeans |
|
@@ 1416-1427 (lines=12) @@
|
| 1413 |
|
/** |
| 1414 |
|
* @depends testDaoGeneration |
| 1415 |
|
*/ |
| 1416 |
|
public function testCyclicReferenceWithInheritance() |
| 1417 |
|
{ |
| 1418 |
|
$userDao = new UserDao($this->tdbmService); |
| 1419 |
|
|
| 1420 |
|
$country = new CountryBean('Norrisland'); |
| 1421 |
|
$user = new UserBean('Chuck Norris', '[email protected]', $country, 'chuck.norris'); |
| 1422 |
|
|
| 1423 |
|
$user->setManager($user); |
| 1424 |
|
|
| 1425 |
|
$this->expectException(TDBMCyclicReferenceException::class); |
| 1426 |
|
$userDao->save($user); |
| 1427 |
|
} |
| 1428 |
|
|
| 1429 |
|
/** |
| 1430 |
|
* @depends testDaoGeneration |