From 9f29af108bbb1076f4c5de0b1bec0bc2b7024e46 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Fri, 16 Jan 2015 07:43:51 +1100 Subject: [PATCH] Fix visibility of some `LiskDAO` methods Summary: Ref T6822. Test Plan: Ran unit tests. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11410 --- .../storage/lisk/__tests__/LiskIsolationTestCase.php | 4 +++- .../storage/lisk/__tests__/LiskIsolationTestDAO.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestCase.php b/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestCase.php index ad289c1469..848dfe7b67 100644 --- a/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestCase.php +++ b/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestCase.php @@ -45,7 +45,9 @@ final class LiskIsolationTestCase extends PhabricatorTestCase { $dao = new LiskIsolationTestDAO(); try { - $dao->establishLiveConnection('r'); + $method = new ReflectionMethod($dao, 'establishLiveConnection'); + $method->setAccessible(true); + $method->invoke($dao, 'r'); $this->assertFailure( 'LiskIsolationTestDAO did not throw an exception when instructed to '. diff --git a/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAO.php b/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAO.php index 02c79544db..7d5a5d6021 100644 --- a/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAO.php +++ b/src/infrastructure/storage/lisk/__tests__/LiskIsolationTestDAO.php @@ -15,13 +15,13 @@ final class LiskIsolationTestDAO extends LiskDAO { return PhabricatorPHID::generateNewPHID('TISO'); } - public function establishLiveConnection($mode) { + protected function establishLiveConnection($mode) { throw new LiskIsolationTestDAOException( 'Isolation failure! DAO is attempting to connect to an external '. 'resource!'); } - public function getConnectionNamespace() { + protected function getConnectionNamespace() { return 'test'; }