From b018e21874a87c7ad8888ac4a31936b358e7926f Mon Sep 17 00:00:00 2001 From: Basil Suter Date: Wed, 6 May 2020 19:45:18 +0200 Subject: [PATCH] test and cdn update --- src/Bootstrap4Asset.php | 4 ++-- tests/src/ActiveFormTest.php | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Bootstrap4Asset.php b/src/Bootstrap4Asset.php index 88aaccd..f03e35c 100644 --- a/src/Bootstrap4Asset.php +++ b/src/Bootstrap4Asset.php @@ -11,11 +11,11 @@ class Bootstrap4Asset extends \yii\web\AssetBundle { public $js = [ - ['//stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js', 'integrity' => 'sha384-xrRywqdh3PHs8keKZN+8zzc5TX0GRTLCcmivcbNJWm2rs5C8PRhcEn3czEjhAO9o', 'crossorigin' => 'anonymous'], + ['//stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js', 'integrity' => 'sha384-6khuMg9gaYr5AxOqhkVIODVIvm9ynTT5J4V1cfthmT+emCG6yVmEZsRHdxlotUnm', 'crossorigin' => 'anonymous'], ]; public $css = [ - ['//stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css', 'integrity' => 'sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T', 'crossorigin' => 'anonymous'], + ['//stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css', 'integrity' => 'sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh', 'crossorigin' => 'anonymous'], ]; diff --git a/tests/src/ActiveFormTest.php b/tests/src/ActiveFormTest.php index 69ec2bb..be9c1f1 100644 --- a/tests/src/ActiveFormTest.php +++ b/tests/src/ActiveFormTest.php @@ -54,6 +54,24 @@ public function testActiveFormLayout() ', ob_get_clean()); } + + /** + * @runInSeparateProcess + */ + public function testCheckboxSwitch() + { + Yii::setAlias('@webroot', dirname(__DIR__)); + $model = new StubModel(); + ob_start(); + ob_implicit_flush(false); + + $form = ActiveForm::begin(['layout' => 'horizontal']); + echo $form->field($model, 'firstname')->checkboxSwitch(); + ActiveForm::end(); + + $this->assertContainsTrimmed(' +
', ob_get_clean()); + } /** * @runInSeparateProcess