fix some testes

This commit is contained in:
Nicolas Le Goff
2012-02-24 20:16:31 +01:00
parent ba61356541
commit f22219f83c
4 changed files with 12 additions and 5 deletions

View File

@@ -26,5 +26,10 @@ return call_user_func(function()
$app->mount('/test', new ControllerUtils\PathFileTest()); $app->mount('/test', new ControllerUtils\PathFileTest());
$app->mount('/connection_test', new ControllerUtils\ConnectionTest()); $app->mount('/connection_test', new ControllerUtils\ConnectionTest());
$app->error(function($e){
});
return $app; return $app;
}); });

View File

@@ -26,5 +26,10 @@ return call_user_func(function()
$app->mount('/test', new ControllerUtils\PathFileTest()); $app->mount('/test', new ControllerUtils\PathFileTest());
$app->mount('/connection_test', new ControllerUtils\ConnectionTest()); $app->mount('/connection_test', new ControllerUtils\ConnectionTest());
$app->error(function($e){
});
return $app; return $app;
}); });

View File

@@ -521,6 +521,7 @@ abstract class PhraseanetPHPUnitAbstract extends WebTestCase
$purger = new Doctrine\Common\DataFixtures\Purger\ORMPurger(); $purger = new Doctrine\Common\DataFixtures\Purger\ORMPurger();
$executor = new Doctrine\Common\DataFixtures\Executor\ORMExecutor(self::$core->getEntityManager(), $purger); $executor = new Doctrine\Common\DataFixtures\Executor\ORMExecutor(self::$core->getEntityManager(), $purger);
$executor->execute(array()); $executor->execute(array());
self::$core["CacheService"]->flushAll();
} }
protected function assertDateAtom($date) protected function assertDateAtom($date)

View File

@@ -525,9 +525,6 @@ class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
*/ */
public function testGet_container_baskets() public function testGet_container_baskets()
{ {
$appbox = appbox::get_instance(\bootstrap::getCore());
$usr_id = $appbox->get_session()->get_usr_id();
$em = self::$core->getEntityManager(); $em = self::$core->getEntityManager();
$basket = $this->insertOneBasket(); $basket = $this->insertOneBasket();
@@ -541,8 +538,7 @@ class record_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
$em->persist($basket_element); $em->persist($basket_element);
$basket->addBasketElement($basket_element); $basket->addBasketElement($basket_element);
$basket = $em->merge($basket);
$em->merge($basket);
$em->flush(); $em->flush();