From 16d9b0e61c9f75718b7ccc1affb3769a46904fd5 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Thu, 13 Mar 2014 15:31:51 +0100 Subject: [PATCH] Updates tests --- .../Model/Manipulator/ApiApplicationManipulatorTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ApiApplicationManipulatorTest.php b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ApiApplicationManipulatorTest.php index 2e6c64977a..2aeb32f091 100644 --- a/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ApiApplicationManipulatorTest.php +++ b/tests/Alchemy/Tests/Phrasea/Model/Manipulator/ApiApplicationManipulatorTest.php @@ -63,12 +63,13 @@ class ApiApplicationManipulatorTest extends \PhraseanetTestCase $applicationSave = clone $application; $countBefore = count(self::$DI['app']['repo.api-applications']->findAll()); $account = self::$DI['app']['manipulator.api-account']->create($application, self::$DI['user']); + $accountMem = clone $account; self::$DI['app']['manipulator.api-oauth-token']->create($account); $manipulator->delete($application); $this->assertGreaterThan(count(self::$DI['app']['repo.api-applications']->findAll()), $countBefore); $accounts = self::$DI['app']['repo.api-accounts']->findByUserAndApplication(self::$DI['user'], $applicationSave); $this->assertEquals(0, count($accounts)); - $tokens = self::$DI['app']['repo.api-oauth-tokens']->findOauthTokens($account); + $tokens = self::$DI['app']['repo.api-oauth-tokens']->findOauthTokens($accountMem); $this->assertEquals(0, count($tokens)); }