|
@@ 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 |
|
@@ 1360-1371 (lines=12) @@
|
| 1357 |
|
/** |
| 1358 |
|
* @depends testDaoGeneration |
| 1359 |
|
*/ |
| 1360 |
|
public function testCyclicReferenceWithInheritance() |
| 1361 |
|
{ |
| 1362 |
|
$userDao = new UserDao($this->tdbmService); |
| 1363 |
|
|
| 1364 |
|
$country = new CountryBean('Norrisland'); |
| 1365 |
|
$user = new UserBean('Chuck Norris', '[email protected]', $country, 'chuck.norris'); |
| 1366 |
|
|
| 1367 |
|
$user->setManager($user); |
| 1368 |
|
|
| 1369 |
|
$this->expectException(TDBMCyclicReferenceException::class); |
| 1370 |
|
$userDao->save($user); |
| 1371 |
|
} |
| 1372 |
|
|
| 1373 |
|
/** |
| 1374 |
|
* @depends testDaoGeneration |