Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F9785448
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/tests/Framework/Html.php b/tests/Framework/Html.php
index d9466e601..259d73e1a 100644
--- a/tests/Framework/Html.php
+++ b/tests/Framework/Html.php
@@ -1,102 +1,93 @@
<?php
/**
* Test class to test rcube_html class
*
* @package Tests
*/
class Framework_Html extends PHPUnit_Framework_TestCase
{
/**
* Class constructor
*/
function test_class()
{
$object = new html;
$this->assertInstanceOf('html', $object, "Class constructor");
}
/**
* Data for test_attrib_string()
*/
function data_attrib_string()
{
return array(
array(
array(), null, '',
),
array(
array('test' => 'test'), null, ' test="test"',
),
array(
array('test' => 'test'), array('test'), ' test="test"',
),
array(
array('test' => 'test'), array('other'), '',
),
array(
array('checked' => true), null, ' checked="checked"',
),
array(
array('checked' => ''), null, '',
),
array(
array('onclick' => ''), null, '',
),
array(
array('size' => 5), null, ' size="5"',
),
array(
array('size' => 'test'), null, '',
),
array(
array('data-test' => 'test'), null, ' data-test="test"',
),
- array(
- array('data-test' => 'test'), array('other'), '',
- ),
- array(
- array('data-test' => 'test'), array('data-test'), ' data-test="test"',
- ),
- array(
- array('data-test' => 'test'), array('data-*'), ' data-test="test"',
- ),
);
}
/**
* Test for attrib_string()
* @dataProvider data_attrib_string
*/
function test_attrib_string($arg1, $arg2, $result)
{
$this->assertEquals(html::attrib_string($arg1, $arg2), $result);
}
/**
* Data for test_quote()
*/
function data_quote()
{
return array(
array('abc', 'abc'),
array('?', '?'),
array('"', '"'),
array('<', '<'),
array('>', '>'),
array('&', '&'),
array('&', '&amp;'),
);
}
/**
* Test for quote()
* @dataProvider data_quote
*/
function test_quote($str, $result)
{
$this->assertEquals(html::quote($str), $result);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Aug 17, 3:14 PM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1261496
Default Alt Text
(2 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment