Exemplo n.º 1
0
 public function testRender()
 {
     $app = eve()->registry()->get('test', 'app');
     $_GET = array('client_id' => $app['app_token'], 'redirect_uri' => '/control/app/search');
     $results = BrowserTest::i()->setPath('/dialog/action/login')->setGet($_GET)->setQueryString($_GET)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 2
0
 public function testValid()
 {
     $data = array('profile_id' => 2);
     $variables = array(2);
     $results = BrowserTest::i()->setPath('/back/action/app/restore')->setPost($data)->setVariables($variables)->setIsValid(true)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 3
0
 public function testRender()
 {
     $app = eve()->registry()->get('test', 'app');
     $_GET = array('access_token' => $app['app_token']);
     $results = BrowserTest::i()->setPath('/rest/action/profile/search')->setGet($_GET)->setSource($_GET)->setIsTriggered(false)->process();
     $this->assertContains('"error": false', $results['data']);
 }
Exemplo n.º 4
0
 public function testValid()
 {
     $data = array('profile_id' => $_SESSION['me']['profile_id'], 'profile_name' => 'Test Action Profile Update last');
     $variables = array($_SESSION['me']['profile_id']);
     $results = BrowserTest::i()->setPath('/back/action/profile/update')->setPost($data)->setVariables($variables)->setIsValid(true)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 5
0
 public function testValid()
 {
     $data = array('app_name' => 'Test Action App Updated', 'app_domain' => '*.test.com', 'app_permissions' => 'public_sso,user_profile,global_profile', 'profile_id' => $_SESSION['me']['profile_id']);
     $app = eve()->registry()->get('test', 'app');
     $variables = array($app['app_id']);
     $results = BrowserTest::i()->setPath('/back/action/app/update')->setPost($data)->setVariables($variables)->setIsValid(true)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 6
0
 public function testRender()
 {
     $app = eve()->registry()->get('test', 'app');
     $session = eve()->registry()->get('test', 'session');
     $_GET = array('access_token' => $app['app_token'], 'access_secret' => $app['app_secret']);
     $_POST = array('code' => $session['session_token']);
     $results = BrowserTest::i()->setPath('/rest/action/access')->setMethod($_GET)->setPost($_POST)->setSource($_GET)->setIsTriggered(false)->process();
     $this->assertContains('"error": false', $results['data']);
 }
Exemplo n.º 7
0
 public function testValid()
 {
     $app = eve()->registry()->get('test', 'app');
     $_GET = array('client_id' => $app['app_token'], 'redirect_uri' => '/control/app/search');
     $_POST = array('profile_name' => 'Test Dialog Action Create', 'profile_email' => '*****@*****.**', 'auth_permissions' => 'user_profile,personal_profile,global_profile', 'auth_password' => '123', 'confirm' => '123');
     $app = eve()->registry()->get('test', 'app');
     $results = BrowserTest::i()->setPath('/dialog/action/update')->setGet($_GET)->setPost($_POST)->setSource($app)->setQueryString($_POST)->setIsValid(true)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 8
0
 public function testRender()
 {
     $app = eve()->registry()->get('test', 'app');
     $_GET = array('access_token' => $app['app_token'], 'access_secret' => $app['app_secret']);
     $_POST = array('profile_name' => 'Profile updated by REST');
     $source = array('profile_id' => 1);
     $results = BrowserTest::i()->setPath('/rest/action/profile/update')->setPost($_POST)->setSource($source)->setIsTriggered(false)->process();
     $this->assertContains('"error": false', $results['data']);
 }
Exemplo n.º 9
0
 public function testValid()
 {
     $app = eve()->registry()->get('test', 'app');
     $auth = eve()->registry()->get('test', 'auth');
     $_GET = array('client_id' => $app['app_token'], 'redirect_uri' => '/control/app/search');
     $config = eve()->settings('test');
     $_POST = array('session_permissions' => $config['scope'], 'action' => 'allow');
     $results = BrowserTest::i()->setPath('/dialog/action/request')->setGet($_GET)->setPost($_POST)->setSource($app)->setQueryString($_GET)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
     $session = eve()->model('session')->request()->process(array('app_id' => $app['app_id'], 'auth_id' => $_SESSION['me']['auth_id'], 'session_permissions' => implode(',', $config['scope'])));
     eve()->registry()->set('test', 'session', $session);
 }
Exemplo n.º 10
0
 public function testRender()
 {
     $results = BrowserTest::i()->setPath('/back/action/logout')->setMethod('GET')->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 11
0
 public function testValid()
 {
     $data = array('auth_slug' => '*****@*****.**', 'auth_password' => 'admin');
     $results = BrowserTest::i()->setPath('/back/action/login')->setPost($data)->setIsValid(true)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 12
0
 public function testValid()
 {
     $data = array('app_name' => 'Test Back App Create', 'app_domain' => '*.test.com', 'app_permissions' => 'public_sso,user_profile,global_profile', 'profile_id' => $_SESSION['me']['profile_id']);
     $results = BrowserTest::i()->setPath('/back/action/app/create')->setPost($data)->setIsValid(true)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 13
0
 public function testRender()
 {
     $variables = array(1);
     $results = BrowserTest::i()->setPath('/back/action/app/refresh')->setMethod('GET')->setVariables($variables)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 14
0
 public function testValid()
 {
     $data = array('profile_name' => 'Test Dialog Action Create', 'profile_email' => '*****@*****.**', 'auth_password' => '123', 'confirm' => '123');
     $results = BrowserTest::i()->setPath('/dialog/action/create')->setPost($data)->setIsValid(true)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 15
0
 public function testRender()
 {
     $results = BrowserTest::i()->setPath('/back/action/app/search')->setMethod('GET')->setIsTriggered(false)->process();
     $this->assertContains('Search', $results['data']);
 }
Exemplo n.º 16
0
 public function testValid()
 {
     $data = array('profile_name' => 'Test Action Create', 'profile_email' => '*****@*****.**', 'auth_permissions' => 'user_profile,personal_profile,global_profile', 'auth_password' => '123', 'confirm' => '123');
     $results = BrowserTest::i()->setPath('/back/action/update')->setPost($data)->setIsValid(true)->setIsTriggered(true)->process();
     $this->assertTrue($results['triggered']);
 }
Exemplo n.º 17
0
 public function testRender()
 {
     $results = BrowserTest::i()->setPath('/dialog/action/invalid')->setMethod('GET')->setIsTriggered(true)->process();
     $this->assertContains('Invalid Request', $results['data']);
 }