Ejemplo n.º 1
0
 public function testWith()
 {
     $account = Accounts::findProfile("jethro_e7")->with('posts', 'Threads', 'doesNotExist');
     $this->assertInstanceOf('StarCitizen\\Models\\Store', $account->threads);
     $this->assertInstanceOf('StarCitizen\\Models\\Store', $account->posts);
     $this->assertEquals('jethro_e7', Accounts::findProfile("jethro_e7")->with('posts', 'threads')->handle);
 }
Ejemplo n.º 2
0
 /**
  * @return Profile
  */
 protected final function profile()
 {
     if ($this->profile === null) {
         $profile = Accounts::findProfile($this->handle);
         if ($profile instanceof Profile) {
             $this->profile = $profile;
         }
     }
     return $this->profile;
 }