forked from propelorm/Propel2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit test for mySQl addColumn FIRST logic
- Loading branch information
Showing
2 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/Propel/Tests/Generator/Platform/MysqlPlatformMigrationTestProvider.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the Propel package. | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* @license MIT License | ||
*/ | ||
|
||
namespace Propel\Tests\Generator\Platform; | ||
|
||
/** | ||
* provider for mysql platform migration unit tests | ||
*/ | ||
class MysqlPlatformMigrationTestProvider extends PlatformMigrationTestProvider { | ||
|
||
|
||
public function providerForTestGetAddColumnFirstDDL() | ||
{ | ||
$schema = <<<EOF | ||
<database name="test" identifierQuoting="true"> | ||
<table name="foo"> | ||
<column name="bar" type="INTEGER" /> | ||
<column name="id" primaryKey="true" type="INTEGER" autoIncrement="true" /> | ||
</table> | ||
</database> | ||
EOF; | ||
$column = $this->getDatabaseFromSchema($schema)->getTable('foo')->getColumn('bar'); | ||
|
||
return array(array($column)); | ||
} | ||
} |