From ace8ac83efa35ad49269f464b19ec49aa447ed25 Mon Sep 17 00:00:00 2001 From: deedydas Date: Mon, 6 May 2013 13:32:00 -0700 Subject: [PATCH] Made Changes to Mock and File generation after pushing some methods to superclass Summary: Ref T2903 Test Plan: Generation working properly. Was broken before. Reviewers: epriestley CC: AnhNhan, aran, Korvin Maniphest Tasks: T2903 Differential Revision: https://secure.phabricator.com/D5844 --- .../files/lipsum/PhabricatorFileTestDataGenerator.php | 10 +--------- .../lipsum/PhabricatorPholioMockTestDataGenerator.php | 4 ---- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/applications/files/lipsum/PhabricatorFileTestDataGenerator.php b/src/applications/files/lipsum/PhabricatorFileTestDataGenerator.php index bc1ac4ca11..394ecd49a7 100644 --- a/src/applications/files/lipsum/PhabricatorFileTestDataGenerator.php +++ b/src/applications/files/lipsum/PhabricatorFileTestDataGenerator.php @@ -4,7 +4,7 @@ final class PhabricatorFileTestDataGenerator extends PhabricatorTestDataGenerator { public function generate() { - $authorPHID = $this->loadAuthorPHID(); + $authorPHID = $this->loadPhabrictorUserPHID(); $dimension = 1 << rand(5, 12); $image = id(new PhabricatorLipsumMondrianArtist()) ->generate($dimension, $dimension); @@ -17,12 +17,4 @@ final class PhabricatorFileTestDataGenerator $file->setMimeType('image/jpeg'); return $file->save(); } - - private function loadPhabrictorUserPHID() { - return $this->loadOneRandom("PhabricatorUser")->getPHID(); - } - - public function loadAuthorPHID() { - return $this->loadPhabrictorUserPHID(); - } } diff --git a/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php b/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php index 86dda48c07..3e71ea0046 100644 --- a/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php +++ b/src/applications/pholio/lipsum/PhabricatorPholioMockTestDataGenerator.php @@ -65,10 +65,6 @@ final class PhabricatorPholioMockTestDataGenerator return $mock->save(); } - public function loadPhabrictorUserPHID() { - return $this->loadOneRandom("PhabricatorUser")->getPHID(); - } - public function generateTitle() { return id(new PhutilLipsumContextFreeGrammar()) ->generate();