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); }
/** * @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; }