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