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