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
3631890c
Commit
3631890c
authored
Oct 24, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed failing validator tests
parent
7e1dd672
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
72 additions
and
0 deletions
+72
-0
BooleanValidatorTest.php
tests/unit/framework/validators/BooleanValidatorTest.php
+6
-0
CompareValidatorTest.php
tests/unit/framework/validators/CompareValidatorTest.php
+5
-0
DateValidatorTest.php
tests/unit/framework/validators/DateValidatorTest.php
+6
-0
DefaultValueValidatorTest.php
...s/unit/framework/validators/DefaultValueValidatorTest.php
+6
-0
EmailValidatorTest.php
tests/unit/framework/validators/EmailValidatorTest.php
+6
-0
ExistValidatorTest.php
tests/unit/framework/validators/ExistValidatorTest.php
+1
-0
FilterValidatorTest.php
tests/unit/framework/validators/FilterValidatorTest.php
+6
-0
NumberValidatorTest.php
tests/unit/framework/validators/NumberValidatorTest.php
+6
-0
RangeValidatorTest.php
tests/unit/framework/validators/RangeValidatorTest.php
+6
-0
RegularExpressionValidatorTest.php
...t/framework/validators/RegularExpressionValidatorTest.php
+6
-0
RequiredValidatorTest.php
tests/unit/framework/validators/RequiredValidatorTest.php
+6
-0
UniqueValidatorTest.php
tests/unit/framework/validators/UniqueValidatorTest.php
+1
-0
UrlValidatorTest.php
tests/unit/framework/validators/UrlValidatorTest.php
+6
-0
ValidatorTest.php
tests/unit/framework/validators/ValidatorTest.php
+5
-0
No files found.
tests/unit/framework/validators/BooleanValidatorTest.php
View file @
3631890c
...
...
@@ -10,6 +10,12 @@ use yiiunit\TestCase;
*/
class
BooleanValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testValidateValue
()
{
$val
=
new
BooleanValidator
;
...
...
tests/unit/framework/validators/CompareValidatorTest.php
View file @
3631890c
...
...
@@ -10,6 +10,11 @@ use yiiunit\TestCase;
class
CompareValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testValidateValueException
()
{
...
...
tests/unit/framework/validators/DateValidatorTest.php
View file @
3631890c
...
...
@@ -10,6 +10,12 @@ use yiiunit\TestCase;
class
DateValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testEnsureMessageIsSet
()
{
$val
=
new
DateValidator
;
...
...
tests/unit/framework/validators/DefaultValueValidatorTest.php
View file @
3631890c
...
...
@@ -8,6 +8,12 @@ use yiiunit\TestCase;
*/
class
DefaultValueValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testValidateAttribute
()
{
$val
=
new
DefaultValueValidator
;
...
...
tests/unit/framework/validators/EmailValidatorTest.php
View file @
3631890c
...
...
@@ -11,6 +11,12 @@ use yiiunit\TestCase;
*/
class
EmailValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testValidateValue
()
{
$validator
=
new
EmailValidator
();
...
...
tests/unit/framework/validators/ExistValidatorTest.php
View file @
3631890c
...
...
@@ -18,6 +18,7 @@ class ExistValidatorTest extends DatabaseTestCase
public
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
ActiveRecord
::
$db
=
$this
->
getConnection
();
}
...
...
tests/unit/framework/validators/FilterValidatorTest.php
View file @
3631890c
...
...
@@ -9,6 +9,12 @@ use yiiunit\TestCase;
class
FilterValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testAssureExceptionOnInit
()
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
);
...
...
tests/unit/framework/validators/NumberValidatorTest.php
View file @
3631890c
...
...
@@ -9,6 +9,12 @@ use yiiunit\TestCase;
class
NumberValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testEnsureMessageOnInit
()
{
$val
=
new
NumberValidator
;
...
...
tests/unit/framework/validators/RangeValidatorTest.php
View file @
3631890c
...
...
@@ -9,6 +9,12 @@ use yiiunit\TestCase;
class
RangeValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testInitException
()
{
$this
->
setExpectedException
(
'yii\base\InvalidConfigException'
,
'The "range" property must be set.'
);
...
...
tests/unit/framework/validators/RegularExpressionValidatorTest.php
View file @
3631890c
...
...
@@ -9,6 +9,12 @@ use yiiunit\TestCase;
class
RegularExpressionValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testValidateValue
()
{
$val
=
new
RegularExpressionValidator
([
'pattern'
=>
'/^[a-zA-Z0-9](\.)?([^\/]*)$/m'
]);
...
...
tests/unit/framework/validators/RequiredValidatorTest.php
View file @
3631890c
...
...
@@ -8,6 +8,12 @@ use yiiunit\TestCase;
class
RequiredValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testValidateValueWithDefaults
()
{
$val
=
new
RequiredValidator
();
...
...
tests/unit/framework/validators/UniqueValidatorTest.php
View file @
3631890c
...
...
@@ -19,6 +19,7 @@ class UniqueValidatorTest extends DatabaseTestCase
public
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
ActiveRecord
::
$db
=
$this
->
getConnection
();
}
...
...
tests/unit/framework/validators/UrlValidatorTest.php
View file @
3631890c
...
...
@@ -9,6 +9,12 @@ use yiiunit\TestCase;
*/
class
UrlValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
public
function
testValidateValue
()
{
$val
=
new
UrlValidator
;
...
...
tests/unit/framework/validators/ValidatorTest.php
View file @
3631890c
...
...
@@ -12,6 +12,11 @@ use yiiunit\TestCase;
class
ValidatorTest
extends
TestCase
{
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
mockApplication
();
}
protected
function
getTestModel
(
$additionalAttributes
=
[])
{
...
...
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