Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Tomáš Trávníček
doctrine-dbal
Commits
7bb07a5b
Commit
7bb07a5b
authored
Sep 04, 2006
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syntax error fix
parent
2e3f8002
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
Record.php
Doctrine/Record.php
+1
-1
ValidatorTestCase.php
tests/ValidatorTestCase.php
+5
-4
classes.php
tests/classes.php
+1
-1
No files found.
Doctrine/Record.php
View file @
7bb07a5b
...
...
@@ -805,7 +805,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
case
'object'
:
$a
[
$v
]
=
serialize
(
$this
->
data
[
$v
]);
break
;;
case
'enum'
case
'enum'
:
$a
[
$v
]
=
$this
->
table
->
enumIndex
(
$v
,
$this
->
data
[
$v
]);
break
;
default
:
...
...
tests/ValidatorTestCase.php
View file @
7bb07a5b
<?php
class
Doctrine_ValidatorTestCase
extends
Doctrine_UnitTestCase
{
public
function
prepareTables
()
{
$this
->
tables
[]
=
"Validator
_
Test"
;
$this
->
tables
[]
=
"ValidatorTest"
;
parent
::
prepareTables
();
}
public
function
testIsValidType
()
{
...
...
@@ -70,7 +70,7 @@ class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
}
public
function
testValidate2
()
{
$test
=
new
Validator
_
Test
();
$test
=
new
ValidatorTest
();
$test
->
mymixed
=
"message"
;
$validator
=
new
Doctrine_Validator
();
...
...
@@ -79,8 +79,9 @@ class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
$stack
=
$validator
->
getErrorStack
();
$this
->
assertTrue
(
is_array
(
$stack
));
$this
->
assertTrue
(
isset
(
$stack
[
'ValidatorTest'
][
0
]));
$stack
=
$stack
[
'ValidatorTest'
][
0
];
$stack
=
$stack
[
'Validator_Test'
][
0
];
$this
->
assertEqual
(
$stack
[
'mystring'
],
Doctrine_Validator
::
ERR_NOTNULL
);
$this
->
assertEqual
(
$stack
[
'myemail2'
],
Doctrine_Validator
::
ERR_NOTBLANK
);
...
...
@@ -136,7 +137,7 @@ class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
$this
->
assertFalse
(
$validator
->
validate
(
$email
,
"address"
,
"example@e.."
,
null
));
$this
->
assertFalse
(
$validator
->
validate
(
$email
,
"address"
,
"example@e.."
,
null
));
}
public
function
testSave
()
{
...
...
tests/classes.php
View file @
7bb07a5b
...
...
@@ -390,7 +390,7 @@ class Log_Status extends Doctrine_Record {
$this
->
hasColumn
(
"name"
,
"string"
,
255
);
}
}
class
Validator
_
Test
extends
Doctrine_Record
{
class
ValidatorTest
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
"mymixed"
,
"string"
,
100
);
$this
->
hasColumn
(
"mystring"
,
"string"
,
100
,
"notnull|unique"
);
...
...
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