Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
yii2bootstrap
Project
Project
Details
Activity
Releases
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
夏彬
yii2bootstrap
Commits
f0fb0093
Commit
f0fb0093
authored
Apr 13, 2017
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compatibility with PHPUnit 6.x
parent
629087c3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
4 deletions
+41
-4
.travis.yml
.travis.yml
+1
-1
ActiveFieldTest.php
tests/ActiveFieldTest.php
+2
-1
CollapseTest.php
tests/CollapseTest.php
+3
-1
TestCase.php
tests/TestCase.php
+1
-1
bootstrap.php
tests/bootstrap.php
+2
-0
compatibility.php
tests/compatibility.php
+32
-0
No files found.
.travis.yml
View file @
f0fb0093
...
...
@@ -17,7 +17,7 @@ cache:
install
:
-
travis_retry composer self-update && composer --version
-
travis_retry composer global require "fxp/composer-asset-plugin:
~1.1.1
"
-
travis_retry composer global require "fxp/composer-asset-plugin:
^1.2.0
"
-
export PATH="$HOME/.composer/vendor/bin:$PATH"
-
travis_retry composer install --prefer-dist --no-interaction
...
...
tests/ActiveFieldTest.php
View file @
f0fb0093
...
...
@@ -36,7 +36,8 @@ class ActiveFieldTest extends TestCase
$this
->
helperModel
=
new
DynamicModel
([
'attributeName'
]);
ob_start
();
$this
->
helperForm
=
new
ActiveForm
([
'action'
=>
'/something'
]);
$this
->
helperForm
=
ActiveForm
::
begin
([
'action'
=>
'/something'
,
'enableClientScript'
=>
false
]);
ActiveForm
::
end
();
ob_end_clean
();
$this
->
activeField
=
new
ActiveField
([
'form'
=>
$this
->
helperForm
]);
...
...
tests/CollapseTest.php
View file @
f0fb0093
...
...
@@ -2,6 +2,7 @@
namespace
yiiunit\extensions\bootstrap
;
use
yii\bootstrap\Collapse
;
use
yii\widgets\ActiveForm
;
/**
* @group bootstrap
...
...
@@ -116,7 +117,8 @@ HTML
{
$template
=
[
'template'
=>
'{input}'
];
ob_start
();
$form
=
\yii\widgets\ActiveForm
::
begin
([
'action'
=>
'/something'
]);
$form
=
ActiveForm
::
begin
([
'action'
=>
'/something'
]);
ActiveForm
::
end
();
ob_end_clean
();
$model
=
new
data\Singer
;
...
...
tests/TestCase.php
View file @
f0fb0093
...
...
@@ -9,7 +9,7 @@ use Yii;
/**
* This is the base class for all yii framework unit tests.
*/
abstract
class
TestCase
extends
\PHPUnit
_Framework_
TestCase
abstract
class
TestCase
extends
\PHPUnit
\Framework\
TestCase
{
protected
function
setUp
()
{
...
...
tests/bootstrap.php
View file @
f0fb0093
...
...
@@ -13,3 +13,5 @@ require_once(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
Yii
::
setAlias
(
'@yiiunit/extensions/bootstrap'
,
__DIR__
);
Yii
::
setAlias
(
'@yii/bootstrap'
,
dirname
(
__DIR__
));
require_once
(
__DIR__
.
'/compatibility.php'
);
\ No newline at end of file
tests/compatibility.php
0 → 100644
View file @
f0fb0093
<?php
/*
* Ensures compatibility with PHPUnit < 6.x
*/
namespace
PHPUnit\Framework\Constraint
{
if
(
!
class_exists
(
'PHPUnit\Framework\Constraint\Constraint'
)
&&
class_exists
(
'PHPUnit_Framework_Constraint'
))
{
abstract
class
Constraint
extends
\PHPUnit_Framework_Constraint
{}
}
}
namespace
PHPUnit\Framework
{
if
(
!
class_exists
(
'PHPUnit\Framework\TestCase'
)
&&
class_exists
(
'PHPUnit_Framework_TestCase'
))
{
abstract
class
TestCase
extends
\PHPUnit_Framework_TestCase
{
/**
* @param string $exception
*/
public
function
expectException
(
$exception
)
{
$this
->
setExpectedException
(
$exception
);
}
/**
* @param string $message
*/
public
function
expectExceptionMessage
(
$message
)
{
$this
->
setExpectedException
(
$this
->
getExpectedException
(),
$message
);
}
}
}
}
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