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