public function testMaxTweetsOnFirstPage()
 {
     $model = $this->getModelThatReturns(0);
     $twitter = $this->getTwitterReturns200Tweets();
     $archiver = new Archiver($this->username, $twitter, $model);
     $output = $archiver->archive();
     $this->assertTrue($this->didFindString($output, '200 tweets on page 1'));
 }
Beispiel #2
0
 /**
  * Grabs all the latest tweets and puts them into the database.
  *
  * @return string Returns a string with informational output.
  */
 public function archive()
 {
     // create twitter instance
     $twitter = new \TijsVerkoyen\Twitter\Twitter($this->config['auth']['consumerKey'], $this->config['auth']['consumerSecret']);
     $twitter->setOAuthToken($this->config['auth']['oauthToken']);
     $twitter->setOAuthTokenSecret($this->config['auth']['oauthSecret']);
     $archiver = new Archiver($this->config['twitter']['username'], $twitter, $this->model);
     return $archiver->archive();
 }
Beispiel #3
0
 /**
  * Step 2: archive and display
  */
 public function step2()
 {
     // run the archiver
     $archiver = new Archiver($this->data['form']['twitterUsername'], $this->twitter, $this->model);
     $this->data['archiverOutput'] = $archiver->archive();
     $this->data['content'] = $this->view->render('install02.php', $this->data, true);
     $this->view->render('_layout.php', $this->data);
 }