forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into docs-guide-ja-structure-views-rev
- Loading branch information
Showing
9 changed files
with
114 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,6 @@ | |
* | ||
* For more details please refer to [HTMLPurifier documentation](http://htmlpurifier.org/). | ||
* | ||
* Note that you should add `ezyang/htmlpurifier` to your composer.json `require` section and run `composer install` | ||
* before using it. | ||
* | ||
* @author Alexander Makarov <[email protected]> | ||
* @since 2.0 | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
namespace yiiunit\extensions\bootstrap; | ||
|
||
use yii\bootstrap\Collapse; | ||
|
||
class CollapseTest extends BootstrapTestCase | ||
{ | ||
public function testRender() | ||
{ | ||
Collapse::$counter = 0; | ||
$output = Collapse::widget([ | ||
'items' => [ | ||
[ | ||
'label' => 'Collapsible Group Item #1', | ||
'content' => 'test content1', | ||
], | ||
[ | ||
'label' => '<h1>Collapsible Group Item #2</h1>', | ||
'content' => '<h2>test content2</h2>', | ||
'contentOptions' => [ | ||
'class' => 'testContentOptions2' | ||
], | ||
'options' => [ | ||
'class' => 'testClass2', | ||
'id' => 'testId2' | ||
], | ||
'encode' => true | ||
], | ||
[ | ||
'label' => '<h1>Collapsible Group Item #3</h1>', | ||
'content' => '<h2>test content3</h2>', | ||
'contentOptions' => [ | ||
'class' => 'testContentOptions3' | ||
], | ||
'options' => [ | ||
'class' => 'testClass3', | ||
'id' => 'testId3' | ||
], | ||
'encode' => false | ||
], | ||
[ | ||
'label' => '<h1>Collapsible Group Item #4</h1>', | ||
'content' => '<h1>test content4</h1>', | ||
], | ||
] | ||
]); | ||
|
||
$this->assertEquals(<<<HTML | ||
<div id="w0" class="panel-group"> | ||
<div class="panel panel-default"><div class="panel-heading"><h4 class="panel-title"><a class="collapse-toggle" href="#w0-collapse1" data-toggle="collapse" data-parent="#w0">Collapsible Group Item #1</a> | ||
</h4></div> | ||
<div id="w0-collapse1" class="panel-collapse collapse"><div class="panel-body">test content1</div> | ||
</div></div> | ||
<div id="testId2" class="testClass2 panel panel-default"><div class="panel-heading"><h4 class="panel-title"><a class="collapse-toggle" href="#w0-collapse2" data-toggle="collapse" data-parent="#w0"><h1>Collapsible Group Item #2</h1></a> | ||
</h4></div> | ||
<div id="w0-collapse2" class="testContentOptions2 panel-collapse collapse"><div class="panel-body"><h2>test content2</h2></div> | ||
</div></div> | ||
<div id="testId3" class="testClass3 panel panel-default"><div class="panel-heading"><h4 class="panel-title"><a class="collapse-toggle" href="#w0-collapse3" data-toggle="collapse" data-parent="#w0"><h1>Collapsible Group Item #3</h1></a> | ||
</h4></div> | ||
<div id="w0-collapse3" class="testContentOptions3 panel-collapse collapse"><div class="panel-body"><h2>test content3</h2></div> | ||
</div></div> | ||
<div class="panel panel-default"><div class="panel-heading"><h4 class="panel-title"><a class="collapse-toggle" href="#w0-collapse4" data-toggle="collapse" data-parent="#w0"><h1>Collapsible Group Item #4</h1></a> | ||
</h4></div> | ||
<div id="w0-collapse4" class="panel-collapse collapse"><div class="panel-body"><h1>test content4</h1></div> | ||
</div></div> | ||
</div> | ||
HTML | ||
, $output); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters