1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 15:22:41 +01:00

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
This commit is contained in:
deedydas 2013-05-06 13:32:00 -07:00 committed by epriestley
parent 2b2641192a
commit ace8ac83ef
2 changed files with 1 additions and 13 deletions

View file

@ -4,7 +4,7 @@ final class PhabricatorFileTestDataGenerator
extends PhabricatorTestDataGenerator { extends PhabricatorTestDataGenerator {
public function generate() { public function generate() {
$authorPHID = $this->loadAuthorPHID(); $authorPHID = $this->loadPhabrictorUserPHID();
$dimension = 1 << rand(5, 12); $dimension = 1 << rand(5, 12);
$image = id(new PhabricatorLipsumMondrianArtist()) $image = id(new PhabricatorLipsumMondrianArtist())
->generate($dimension, $dimension); ->generate($dimension, $dimension);
@ -17,12 +17,4 @@ final class PhabricatorFileTestDataGenerator
$file->setMimeType('image/jpeg'); $file->setMimeType('image/jpeg');
return $file->save(); return $file->save();
} }
private function loadPhabrictorUserPHID() {
return $this->loadOneRandom("PhabricatorUser")->getPHID();
}
public function loadAuthorPHID() {
return $this->loadPhabrictorUserPHID();
}
} }

View file

@ -65,10 +65,6 @@ final class PhabricatorPholioMockTestDataGenerator
return $mock->save(); return $mock->save();
} }
public function loadPhabrictorUserPHID() {
return $this->loadOneRandom("PhabricatorUser")->getPHID();
}
public function generateTitle() { public function generateTitle() {
return id(new PhutilLipsumContextFreeGrammar()) return id(new PhutilLipsumContextFreeGrammar())
->generate(); ->generate();