|
@@ 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 |
|
@@ 1384-1395 (lines=12) @@
|
| 1381 |
|
/** |
| 1382 |
|
* @depends testDaoGeneration |
| 1383 |
|
*/ |
| 1384 |
|
public function testCyclicReferenceWithInheritance() |
| 1385 |
|
{ |
| 1386 |
|
$userDao = new UserDao($this->tdbmService); |
| 1387 |
|
|
| 1388 |
|
$country = new CountryBean('Norrisland'); |
| 1389 |
|
$user = new UserBean('Chuck Norris', '[email protected]', $country, 'chuck.norris'); |
| 1390 |
|
|
| 1391 |
|
$user->setManager($user); |
| 1392 |
|
|
| 1393 |
|
$this->expectException(TDBMCyclicReferenceException::class); |
| 1394 |
|
$userDao->save($user); |
| 1395 |
|
} |
| 1396 |
|
|
| 1397 |
|
/** |
| 1398 |
|
* @depends testDaoGeneration |