public function testConfigOptionsIsAdmin()
 {
     // build some options data
     $builders = $this->buildPluginData();
     $this->simulateLogin('*****@*****.**', true);
     $owner_dao = DAOFactory::getDAO('OwnerDAO');
     $owner = $owner_dao->getByEmail(Session::getLoggedInUser());
     $controller = new TwitterRealtimePluginConfigurationController($owner, 'twitterrealtime');
     $output = $controller->go();
     $this->assertPattern('/save options/', $output);
     // should have no submit option
     $this->assertPattern('/php_path/', $output);
     $this->assertPattern('/redis/', $output);
     // should have secret option
 }
Exemplo n.º 2
0
 /**
  * @param  $owner
  * @return string
  */
 public function renderConfiguration($owner)
 {
     $controller = new TwitterRealtimePluginConfigurationController($owner, 'twitterrealtime');
     return $controller->go();
 }