Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2513094
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/tests/Rcmail/HtmlPage.php b/tests/Rcmail/HtmlPage.php
index 2c773022b..80754a50e 100644
--- a/tests/Rcmail/HtmlPage.php
+++ b/tests/Rcmail/HtmlPage.php
@@ -1,33 +1,33 @@
<?php
/**
* Test class to test rcmail_html_page class
*
* @package Tests
*/
class Rcmail_RcmailHtmlPage extends ActionTestCase
{
/**
* Test html page output
*/
function test_html_output()
{
$page = new rcmail_html_page();
$page->register_inline_warning('Test', 'Button', 'http://url');
ob_start();
$page->write();
$output = ob_get_contents();
ob_end_clean();
$expected_body = '<body><div class="rcmail-inline-message rcmail-inline-warning"><span>Test</span>'
. '<p class="rcmail-inline-buttons"><button onclick="location.href = \'http://url\'">Button</button></p></div>';
- $expected_link = '<link rel="stylesheet" type="text/css" href="skins/elastic/styles/embed.min.css';
+ $expected_link = '<link rel="stylesheet" type="text/css" href="skins/elastic/styles/embed.';
$this->assertTrue(strpos($output, '<html') === 0);
$this->assertTrue(strpos($output, $expected_body) !== false);
$this->assertTrue(strpos($output, $expected_link) !== false);
}
}
diff --git a/tests/Rcmail/Oauth.php b/tests/Rcmail/Oauth.php
index dcf847c13..42fea5cd3 100644
--- a/tests/Rcmail/Oauth.php
+++ b/tests/Rcmail/Oauth.php
@@ -1,74 +1,74 @@
<?php
/**
* Test class to test rcmail_oauth class
*
* @package Tests
*/
class Rcmail_RcmailOauth extends ActionTestCase
{
/**
* Test jwt_decode() method
*/
function test_jwt_decode()
{
$jwt = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.EkN-DOsnsuRjRO6BxXemmJDm3HbxrbRzXglbN2S4sOkopdU4IsDxTI8jO19W_A4K8ZPJijNLis4EZsHeY559a4DFOd50_OqgHGuERTqYZyuhtF39yxJPAjUESwxk2J5k_4zM3O-vtd1Ghyo4IbqKKSy6J9mTniYJPenn5-HIirE';
$oauth = rcmail_oauth::get_instance();
// We can't use expectException until we drop support for phpunit 4.8 (i.e. PHP 5.4)
// $this->expectException(RuntimeException::class);
try {
$oauth->jwt_decode($jwt);
}
catch (RuntimeException $e) {
}
$this->assertTrue(isset($e));
}
/**
* Test is_enabled() method
*/
function test_is_enabled()
{
$oauth = rcmail_oauth::get_instance();
$this->assertFalse($oauth->is_enabled());
}
/**
* Test get_redirect_uri() method
*/
function test_get_redirect_uri()
{
$oauth = rcmail_oauth::get_instance();
- $this->assertSame('http://:/./phpunit/index.php/login/oauth', $oauth->get_redirect_uri());
+ $this->assertRegexp('|^http://.*/index.php/login/oauth$|', $oauth->get_redirect_uri());
}
/**
* Test login_redirect() method
*/
function test_login_redirect()
{
$this->markTestIncomplete();
}
/**
* Test request_access_token() method
*/
function test_request_access_token()
{
$this->markTestIncomplete();
}
/**
* Test refresh_access_token() method
*/
function test_refresh_access_token()
{
$this->markTestIncomplete();
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Apr 18, 8:26 AM (2 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
435406
Default Alt Text
(3 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment