forked from zendframework/zendframework
-
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.
Merge branch 'add/ddl.columnBigInt' of git://github.com/samsonasik/zf2 into samsonasik-add/ddl.columnBigInt
- Loading branch information
Showing
3 changed files
with
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\Db\Sql\Ddl\Column; | ||
|
||
class BigInteger extends Integer | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
protected $type = 'BIGINT'; | ||
} |
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,37 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace ZendTest\Db\Sql\Ddl\Column; | ||
|
||
use Zend\Db\Sql\Ddl\Column\BigInteger; | ||
|
||
class BigIntegerTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
/** | ||
* @covers Zend\Db\Sql\Ddl\Column\BigInteger::__construct | ||
*/ | ||
public function testObjectConstruction() | ||
{ | ||
$integer = new BigInteger('foo'); | ||
$this->assertEquals('foo', $integer->getName()); | ||
} | ||
|
||
/** | ||
* @covers Zend\Db\Sql\Ddl\Column\Column::getExpressionData | ||
*/ | ||
public function testGetExpressionData() | ||
{ | ||
$column = new BigInteger('foo'); | ||
$this->assertEquals( | ||
array(array('%s %s', array('foo', 'BIGINT NOT NULL'), array($column::TYPE_IDENTIFIER, $column::TYPE_LITERAL))), | ||
$column->getExpressionData() | ||
); | ||
} | ||
} |
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