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
57655c8b
Unverified
Commit
57655c8b
authored
Jun 06, 2019
by
Sergei Morozov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that (VAR)CHAR column length is specified in characters, not bytes
parent
b93ec6d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
6 deletions
+37
-6
ColumnTest.php
tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest.php
+37
-6
No files found.
tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest.php
View file @
57655c8b
...
...
@@ -18,22 +18,53 @@ abstract class ColumnTest extends DbalFunctionalTestCase
$this
->
assertColumn
(
Types
::
STRING
,
[],
'Test'
,
ParameterType
::
STRING
);
}
public
function
testVariableLengthStringWithLength
()
:
void
/**
* @dataProvider string8Provider
*/
public
function
testVariableLengthStringWithLength
(
string
$value
)
:
void
{
$this
->
assertColumn
(
Types
::
STRING
,
[
'length'
=>
8
],
'Doctrine'
,
ParameterType
::
STRING
);
$this
->
assertColumn
(
Types
::
STRING
,
[
'length'
=>
8
],
$value
,
ParameterType
::
STRING
);
}
public
function
testFixedLengthStringNoLength
()
:
void
/**
* @dataProvider string1Provider
*/
public
function
testFixedLengthStringNoLength
(
string
$value
)
:
void
{
$this
->
assertColumn
(
Types
::
STRING
,
[
'fixed'
=>
true
],
'Z'
,
ParameterType
::
STRING
);
$this
->
assertColumn
(
Types
::
STRING
,
[
'fixed'
=>
true
],
$value
,
ParameterType
::
STRING
);
}
public
function
testFixedLengthStringWithLength
()
:
void
/**
* @dataProvider string8Provider
*/
public
function
testFixedLengthStringWithLength
(
string
$value
)
:
void
{
$this
->
assertColumn
(
Types
::
STRING
,
[
'fixed'
=>
true
,
'length'
=>
8
,
],
'Doctrine'
,
ParameterType
::
STRING
);
],
$value
,
ParameterType
::
STRING
);
}
/**
* @return iterable<string, array<int, mixed>>
*/
public
static
function
string1Provider
()
:
iterable
{
return
[
'ansi'
=>
[
'Z'
],
'unicode'
=>
[
'Я'
],
];
}
/**
* @return iterable<string, array<int, mixed>>
*/
public
static
function
string8Provider
()
:
iterable
{
return
[
'ansi'
=>
[
'Doctrine'
],
'unicode'
=>
[
'Доктрина'
],
];
}
public
function
testVariableLengthBinaryNoLength
()
:
void
...
...
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