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
3149a9fd
Commit
3149a9fd
authored
Oct 19, 2014
by
Marco Pivetta
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/#696-DBAL-1013-table-diff-new-name-may-not-be-set'
Close #696
parents
b7730eee
fadc5d81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
TableDiff.php
lib/Doctrine/DBAL/Schema/TableDiff.php
+2
-2
TableDiffTest.php
tests/Doctrine/Tests/DBAL/Schema/TableDiffTest.php
+33
-0
No files found.
lib/Doctrine/DBAL/Schema/TableDiff.php
View file @
3149a9fd
...
@@ -155,10 +155,10 @@ class TableDiff
...
@@ -155,10 +155,10 @@ class TableDiff
}
}
/**
/**
* @return \Doctrine\DBAL\Schema\Identifier
* @return \Doctrine\DBAL\Schema\Identifier
|boolean
*/
*/
public
function
getNewName
()
public
function
getNewName
()
{
{
return
new
Identifier
(
$this
->
newName
)
;
return
$this
->
newName
?
new
Identifier
(
$this
->
newName
)
:
$this
->
newName
;
}
}
}
}
tests/Doctrine/Tests/DBAL/Schema/TableDiffTest.php
0 → 100644
View file @
3149a9fd
<?php
namespace
Doctrine\Tests\DBAL\Schema
;
use
Doctrine\DBAL\Schema\Identifier
;
use
Doctrine\DBAL\Schema\TableDiff
;
class
TableDiffTest
extends
\PHPUnit_Framework_TestCase
{
/**
* @group DBAL-1013
*/
public
function
testReturnsName
()
{
$tableDiff
=
new
TableDiff
(
'foo'
);
$this
->
assertEquals
(
new
Identifier
(
'foo'
),
$tableDiff
->
getName
());
}
/**
* @group DBAL-1013
*/
public
function
testReturnsNewName
()
{
$tableDiff
=
new
TableDiff
(
'foo'
);
$this
->
assertFalse
(
$tableDiff
->
getNewName
());
$tableDiff
->
newName
=
'bar'
;
$this
->
assertEquals
(
new
Identifier
(
'bar'
),
$tableDiff
->
getNewName
());
}
}
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