/**
  * Test config isa admin
  */
 public function testConfigOptionsIsAdmin()
 {
     // build some options data
     $this->simulateLogin('*****@*****.**', $isadmin = true);
     $owner_dao = DAOFactory::getDAO('OwnerDAO');
     $owner = $owner_dao->getByEmail(Session::getLoggedInUser());
     $controller = new ExpandURLsPluginConfigurationController($owner, 'flickrthumbnails');
     $output = $controller->go();
     // we have a text form element with proper data
     $this->assertPattern('/save options/', $output);
     // should have submit option
     $this->assertPattern('/plugin_options_error_flickr_api_key/', $output);
     // should have api key option
     $this->assertPattern('/var is_admin = true/', $output);
     // is a js admin
     //app not configured
     $controller = new ExpandURLsPluginConfigurationController($owner, 'flickrthumbnails');
     $output = $controller->go();
     $this->assertPattern('/var required_values_set = false/', $output);
     // is not configured
 }
 /**
  * Render the config page.
  */
 public function renderConfiguration($owner)
 {
     $controller = new ExpandURLsPluginConfigurationController($owner, 'expandurls');
     return $controller->go();
 }