From 462793d90c7065600fe246fa4080e3363e0fb58f Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 18 Sep 2012 17:00:57 +0200 Subject: [PATCH] Update tests --- tests/Alchemy/Phrasea/Controller/Admin/DataboxTest.php | 3 ++- tests/Alchemy/Phrasea/Controller/Prod/UploadTest.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/Alchemy/Phrasea/Controller/Admin/DataboxTest.php b/tests/Alchemy/Phrasea/Controller/Admin/DataboxTest.php index 8a91ab6631..85e4a1dc31 100644 --- a/tests/Alchemy/Phrasea/Controller/Admin/DataboxTest.php +++ b/tests/Alchemy/Phrasea/Controller/Admin/DataboxTest.php @@ -43,12 +43,13 @@ class DataboxTest extends \PhraseanetWebTestCaseAuthenticatedAbstract self::$createdCollections = null; + self::dropDatabase(); parent::tearDownAfterClass(); } public function tearDown() { -// self::dropDatabase(); + self::dropDatabase(); parent::tearDown(); } diff --git a/tests/Alchemy/Phrasea/Controller/Prod/UploadTest.php b/tests/Alchemy/Phrasea/Controller/Prod/UploadTest.php index ae6973d7cf..a78c32caf4 100644 --- a/tests/Alchemy/Phrasea/Controller/Prod/UploadTest.php +++ b/tests/Alchemy/Phrasea/Controller/Prod/UploadTest.php @@ -14,6 +14,7 @@ class UploadTest extends \PhraseanetWebTestCaseAuthenticatedAbstract protected $client; protected $tmpFile; protected static $need_records = false; + protected static $useExceptionHandler = false; public function setUp() { @@ -235,7 +236,7 @@ class UploadTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(\Alchemy\Phrasea\Border\Manager::RECORD_CREATED, $datas['code']); $id = explode('_', $datas['id']); - $record = new \record_adapter($id[0], $id[1]); + $record = new \record_adapter(self::$application, $id[0], $id[1]); $this->assertFalse($record->is_grouping()); $this->assertEquals(array(), $datas['reasons']); } @@ -271,7 +272,7 @@ class UploadTest extends \PhraseanetWebTestCaseAuthenticatedAbstract $this->assertEquals(\Alchemy\Phrasea\Border\Manager::RECORD_CREATED, $datas['code']); $id = explode('_', $datas['id']); - $record = new \record_adapter($id[0], $id[1]); + $record = new \record_adapter(self::$application, $id[0], $id[1]); $this->assertFalse($record->is_grouping()); $this->assertEquals(1, substr(strrev($record->get_status()), 4, 1)); $this->assertEquals(array(), $datas['reasons']);