Esempio n. 1
0
 public function testInstantiate()
 {
     $rawData = Accounts::findPosts("Jethro_E7", true, false);
     $store = new Store($rawData['data'], '\\Post', 'post', 'post_id');
     $store->new = true;
     $this->assertFalse($store->new);
 }
Esempio n. 2
0
 public function testPosts()
 {
     $posts = Accounts::findPosts("Jethro_E7");
     $this->assertInstanceOf('StarCitizen\\Models\\Store', $posts);
     $this->assertTrue(count($posts) > 0);
     foreach ($posts as $post) {
         $this->assertInstanceOf('StarCitizen\\Models\\Post', $post);
     }
 }
Esempio n. 3
0
 /**
  * @return Store
  */
 protected final function posts()
 {
     if ($this->posts === null) {
         $posts = Accounts::findPosts($this->handle);
         if ($posts instanceof Store) {
             $this->posts = $posts;
         }
     }
     return $this->posts;
 }