Beispiel #1
0
 public function setUp()
 {
     $this->project = Project::fetch(self::$conn, 1);
     $this->status = AreaStatus::fetchByProject(self::$conn, 1, $this->project);
     $this->territory = Territory::fetchByProject(self::$conn, 1, $this->project);
     $this->area = Area::newArea($this->project, $this->territory, $this->status, 'Area1');
     $this->area->insert(self::$conn);
     $pp = new CourseProgress($this->area);
     $pp->insert(self::$conn);
 }
Beispiel #2
0
 public function setUp()
 {
     $this->project = Project::fetch(self::$conn, 1);
     $this->status = AreaStatus::fetchByProject(self::$conn, 1, $this->project);
     $this->territory = Territory::fetchByProject(self::$conn, 1, $this->project);
     $this->area = Area::newArea($this->project, $this->territory, $this->status, 'Area1');
     $this->area->insert(self::$conn);
     $this->area2 = Area::newArea($this->project, $this->territory, $this->status, 'Area2');
     $lang = new Language();
     $lang->setId(1);
     $this->user = User::newUser('login', 'Some user', $lang);
     $this->user->insert(self::$conn);
     $this->user2 = User::newUser('login2', 'Another user', $lang);
     $this->user2->insert(self::$conn);
     $tpa1 = new CourseProgress($this->area);
     $tpa1->insert(self::$conn);
 }
Beispiel #3
0
 public function setUp()
 {
     $this->project = Project::fetch(self::$conn, 1);
     $this->status = AreaStatus::fetchByProject(self::$conn, 1, $this->project);
     $this->territory = Territory::fetchByProject(self::$conn, 1, $this->project);
     $this->area = Area::newArea($this->project, $this->territory, $this->status, 'Area1');
     $this->area->insert(self::$conn);
     $this->course = new Course();
     $this->course->setProject($this->project);
     $this->course->setName('Foo');
     $this->course->setAuthorName('Foo');
     $this->course->setAuthorEmail('*****@*****.**');
     $this->course->setPresentationLink('http://www.example.com/');
     $this->course->setIsPublished(true);
     $this->course->insert(self::$conn);
     $lang = new Language();
     $lang->setId(1);
     $this->user = User::newUser('login', 'Some user', $lang);
     $this->user->insert(self::$conn);
     $this->anotherUser = User::newUser('login2', 'Another user', $lang);
     $this->anotherUser->insert(self::$conn);
     $pp = new CourseProgress($this->area);
     $pp->insert(self::$conn);
 }