mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 22:32:40 +08:00
Merge pull request #15715 from berosoboy/fix-test-output
Prevent output among phpunit tests
This commit is contained in:
@ -141,6 +141,7 @@ HTML
|
||||
public function testShouldTriggerInitEvent()
|
||||
{
|
||||
$initTriggered = false;
|
||||
ob_start();
|
||||
$form = ActiveForm::begin(
|
||||
[
|
||||
'action' => '/something',
|
||||
@ -151,6 +152,7 @@ HTML
|
||||
]
|
||||
);
|
||||
ActiveForm::end();
|
||||
ob_end_clean();
|
||||
$this->assertTrue($initTriggered);
|
||||
}
|
||||
|
||||
|
||||
@ -45,6 +45,7 @@ class PjaxTest extends TestCase
|
||||
public function testShouldTriggerInitEvent()
|
||||
{
|
||||
$initTriggered = false;
|
||||
ob_start();
|
||||
$pjax = new Pjax(
|
||||
[
|
||||
'on init' => function () use (&$initTriggered) {
|
||||
@ -52,7 +53,7 @@ class PjaxTest extends TestCase
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
ob_end_clean();
|
||||
$this->assertTrue($initTriggered);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user