Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
6d66a98a
Commit
6d66a98a
authored
Aug 09, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test break fix.
parent
7aeb2fcf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
login.php
apps/basic/views/site/login.php
+1
-1
HtmlTest.php
tests/unit/framework/helpers/HtmlTest.php
+4
-4
No files found.
apps/basic/views/site/login.php
View file @
6d66a98a
...
@@ -19,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
...
@@ -19,7 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
<?php
$form
=
ActiveForm
::
begin
(
array
(
'id'
=>
'login-form'
));
?>
<?php
$form
=
ActiveForm
::
begin
(
array
(
'id'
=>
'login-form'
));
?>
<?php
echo
$form
->
field
(
$model
,
'username'
)
->
textInput
();
?>
<?php
echo
$form
->
field
(
$model
,
'username'
)
->
textInput
();
?>
<?php
echo
$form
->
field
(
$model
,
'password'
)
->
passwordInput
();
?>
<?php
echo
$form
->
field
(
$model
,
'password'
)
->
passwordInput
();
?>
<?php
echo
$form
->
field
(
$model
,
'rememberMe'
,
array
(
'options'
=>
array
(
'class'
=>
'checkbox'
))
)
->
checkbox
();
?>
<?php
echo
$form
->
field
(
$model
,
'rememberMe'
)
->
checkbox
();
?>
<div
class=
"form-actions"
>
<div
class=
"form-actions"
>
<?php
echo
Html
::
submitButton
(
'Login'
,
array
(
'class'
=>
'btn btn-primary'
));
?>
<?php
echo
Html
::
submitButton
(
'Login'
,
array
(
'class'
=>
'btn btn-primary'
));
?>
</div>
</div>
...
...
tests/unit/framework/helpers/HtmlTest.php
View file @
6d66a98a
...
@@ -217,7 +217,7 @@ class HtmlTest extends TestCase
...
@@ -217,7 +217,7 @@ class HtmlTest extends TestCase
'label'
=>
'ccc'
,
'label'
=>
'ccc'
,
'labelOptions'
=>
array
(
'class'
=>
'bbb'
),
'labelOptions'
=>
array
(
'class'
=>
'bbb'
),
)));
)));
$this
->
assertEquals
(
'<input type="hidden" name="test" value="0"><div class="radio"><label><input type="checkbox" class="a" name="test" value="2" checked></label></div>'
,
Html
::
radio
(
'test'
,
true
,
array
(
$this
->
assertEquals
(
'<input type="hidden" name="test" value="0"><div class="radio"><label><input type="checkbox" class="a" name="test" value="2" checked>
ccc
</label></div>'
,
Html
::
radio
(
'test'
,
true
,
array
(
'class'
=>
'a'
,
'class'
=>
'a'
,
'uncheck'
=>
'0'
,
'uncheck'
=>
'0'
,
'label'
=>
'ccc'
,
'label'
=>
'ccc'
,
...
@@ -237,7 +237,7 @@ class HtmlTest extends TestCase
...
@@ -237,7 +237,7 @@ class HtmlTest extends TestCase
'label'
=>
'ccc'
,
'label'
=>
'ccc'
,
'labelOptions'
=>
array
(
'class'
=>
'bbb'
),
'labelOptions'
=>
array
(
'class'
=>
'bbb'
),
)));
)));
$this
->
assertEquals
(
'<input type="hidden" name="test" value="0"><div class="checkbox"><label><input type="checkbox" class="a" name="test" value="2" checked></label></div>'
,
Html
::
checkbox
(
'test'
,
true
,
array
(
$this
->
assertEquals
(
'<input type="hidden" name="test" value="0"><div class="checkbox"><label><input type="checkbox" class="a" name="test" value="2" checked>
ccc
</label></div>'
,
Html
::
checkbox
(
'test'
,
true
,
array
(
'class'
=>
'a'
,
'class'
=>
'a'
,
'uncheck'
=>
'0'
,
'uncheck'
=>
'0'
,
'label'
=>
'ccc'
,
'label'
=>
'ccc'
,
...
@@ -337,7 +337,7 @@ EOD;
...
@@ -337,7 +337,7 @@ EOD;
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
checkboxList
(
'test'
,
array
(
'value2'
),
$this
->
getDataItems2
()));
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
checkboxList
(
'test'
,
array
(
'value2'
),
$this
->
getDataItems2
()));
$expected
=
<<<EOD
$expected
=
<<<EOD
<
div class="checkbox"><input type="hidden" name="test" value="0
"><label><input type="checkbox" name="test[]" value="value1"> text1</label></div><br>
<
input type="hidden" name="test" value="0"><div class="checkbox
"><label><input type="checkbox" name="test[]" value="value1"> text1</label></div><br>
<div class="checkbox"><label><input type="checkbox" name="test[]" value="value2" checked> text2</label></div>
<div class="checkbox"><label><input type="checkbox" name="test[]" value="value2" checked> text2</label></div>
EOD;
EOD;
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
checkboxList
(
'test'
,
array
(
'value2'
),
$this
->
getDataItems
(),
array
(
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
checkboxList
(
'test'
,
array
(
'value2'
),
$this
->
getDataItems
(),
array
(
...
@@ -373,7 +373,7 @@ EOD;
...
@@ -373,7 +373,7 @@ EOD;
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
radioList
(
'test'
,
array
(
'value2'
),
$this
->
getDataItems2
()));
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
radioList
(
'test'
,
array
(
'value2'
),
$this
->
getDataItems2
()));
$expected
=
<<<EOD
$expected
=
<<<EOD
<
div class="radio"><input type="hidden" name="test" value="0
"><label><input type="radio" name="test" value="value1"> text1</label></div><br>
<
input type="hidden" name="test" value="0"><div class="radio
"><label><input type="radio" name="test" value="value1"> text1</label></div><br>
<div class="radio"><label><input type="radio" name="test" value="value2" checked> text2</label></div>
<div class="radio"><label><input type="radio" name="test" value="value2" checked> text2</label></div>
EOD;
EOD;
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
radioList
(
'test'
,
array
(
'value2'
),
$this
->
getDataItems
(),
array
(
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
radioList
(
'test'
,
array
(
'value2'
),
$this
->
getDataItems
(),
array
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment