Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Roundcube\Tests\Actions\Login; use Roundcube\Tests\ActionTestCase; use R..
Decoded Output download
<?php
namespace Roundcube\Tests\Actions\Login;
use Roundcube\Tests\ActionTestCase;
use Roundcube\Tests\OutputHtmlMock;
use Roundcube\Tests\StderrMock;
/**
* Test class to test rcmail_action_login_oauth
*/
class OauthTest extends ActionTestCase
{
/**
* Test run
*/
public function test_run_login_redirect()
{
$action = new
cmail_action_login_oauth();
$output = $this->initOutput(
cmail_action::MODE_HTTP, 'login', '');
$this->assertInstanceOf(
cmail_action::class, $action);
$this->assertTrue($action->checks());
$this->runAndAssert($action, OutputHtmlMock::E_EXIT);
$result = $output->getOutput();
$this->assertSame("ERROR: Missing required OAuth config options 'oauth_auth_uri', 'oauth_client_id'", trim(StderrMock::$output));
$this->assertNull($output->getOutput());
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Roundcube\Tests\Actions\Login;
use Roundcube\Tests\ActionTestCase;
use Roundcube\Tests\OutputHtmlMock;
use Roundcube\Tests\StderrMock;
/**
* Test class to test rcmail_action_login_oauth
*/
class OauthTest extends ActionTestCase
{
/**
* Test run
*/
public function test_run_login_redirect()
{
$action = new \rcmail_action_login_oauth();
$output = $this->initOutput(\rcmail_action::MODE_HTTP, 'login', '');
$this->assertInstanceOf(\rcmail_action::class, $action);
$this->assertTrue($action->checks());
$this->runAndAssert($action, OutputHtmlMock::E_EXIT);
$result = $output->getOutput();
$this->assertSame("ERROR: Missing required OAuth config options 'oauth_auth_uri', 'oauth_client_id'", trim(StderrMock::$output));
$this->assertNull($output->getOutput());
}
}
Function Calls
None |
Stats
MD5 | 23fa8d4c62a800059a3d68dace5cae2c |
Eval Count | 0 |
Decode Time | 97 ms |