Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117752443
HtmlCheckbox.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
889 B
Referenced Files
None
Subscribers
None
HtmlCheckbox.php
View Options
<?php
/**
* Test class to test html_checkbox class
*
* @package Tests
*/
class
Framework_HtmlCheckbox
extends
PHPUnit\Framework\TestCase
{
/**
* Class constructor
*/
function
test_checked_state
()
{
$input
=
new
html_checkbox
([
'value'
=>
1
]);
$this
->
assertSame
(
'<input value="1" type="checkbox">'
,
$input
->
show
(
0
));
$this
->
assertSame
(
'<input value="1" type="checkbox">'
,
$input
->
show
(
'0'
));
$this
->
assertSame
(
'<input value="1" checked="checked" type="checkbox">'
,
$input
->
show
(
1
));
$this
->
assertSame
(
'<input value="1" checked="checked" type="checkbox">'
,
$input
->
show
(
'1'
));
$this
->
assertSame
(
'<input value="1" checked="checked" type="checkbox">'
,
$input
->
show
(
true
));
// test that the checked state does not "leak"
$this
->
assertSame
(
'<input value="1" type="checkbox">'
,
$input
->
show
(
0
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Apr 4, 4:08 AM (4 h, 36 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
27/d3/abed46072ba7f8c4f659688d6d52
Default Alt Text
HtmlCheckbox.php (889 B)
Attached To
Mode
R113 roundcubemail
Attached
Detach File
Event Timeline