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
bcbdb0cd
Commit
bcbdb0cd
authored
Oct 05, 2012
by
Lee Davis
Committed by
Benjamin Eberlei
May 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update comparitor test to use assertCount
parent
43530584
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ComparatorTest.php
tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php
+4
-4
No files found.
tests/Doctrine/Tests/DBAL/Schema/ComparatorTest.php
View file @
bcbdb0cd
...
@@ -222,12 +222,12 @@ class ComparatorTest extends \PHPUnit_Framework_TestCase
...
@@ -222,12 +222,12 @@ class ComparatorTest extends \PHPUnit_Framework_TestCase
$c
=
new
Comparator
();
$c
=
new
Comparator
();
$tableDiff
=
$c
->
diffTable
(
$tableA
,
$tableB
);
$tableDiff
=
$c
->
diffTable
(
$tableA
,
$tableB
);
$this
->
assert
Equals
(
1
,
count
(
$tableDiff
->
renamedColumns
)
,
"we should have one rename datefield1 => new_datefield1."
);
$this
->
assert
Count
(
1
,
$tableDiff
->
renamedColumns
,
"we should have one rename datefield1 => new_datefield1."
);
$this
->
assertArrayHasKey
(
'datefield1'
,
$tableDiff
->
renamedColumns
,
"'datefield1' should be set to be renamed to new_datefield1"
);
$this
->
assertArrayHasKey
(
'datefield1'
,
$tableDiff
->
renamedColumns
,
"'datefield1' should be set to be renamed to new_datefield1"
);
$this
->
assert
Equals
(
1
,
count
(
$tableDiff
->
addedColumns
)
,
"'new_datefield2' should be added"
);
$this
->
assert
Count
(
1
,
$tableDiff
->
addedColumns
,
"'new_datefield2' should be added"
);
$this
->
assertArrayHasKey
(
'new_datefield2'
,
$tableDiff
->
addedColumns
,
"'new_datefield2' should be added, not created through renaming!"
);
$this
->
assertArrayHasKey
(
'new_datefield2'
,
$tableDiff
->
addedColumns
,
"'new_datefield2' should be added, not created through renaming!"
);
$this
->
assert
Equals
(
0
,
count
(
$tableDiff
->
removedColumns
)
,
"Nothing should be removed."
);
$this
->
assert
Count
(
0
,
$tableDiff
->
removedColumns
,
"Nothing should be removed."
);
$this
->
assert
Equals
(
0
,
count
(
$tableDiff
->
changedColumns
)
,
"Nothing should be changed as all fields old & new have diff names."
);
$this
->
assert
Count
(
0
,
$tableDiff
->
changedColumns
,
"Nothing should be changed as all fields old & new have diff names."
);
}
}
public
function
testCompareRemovedIndex
()
public
function
testCompareRemovedIndex
()
...
...
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