Phalcon\Test\Unit\Db\Column\PostgresqlTest::testHasAutoIncrementDefault PHP Method

testHasAutoIncrementDefault() public method

Tests Postgresql::hasDefault for autoincrement fields
Since: 2016-09-28
Author: Serghei Iakovlev ([email protected])
    public function testHasAutoIncrementDefault()
    {
        $this->specify('The autoincrement column has default value', function () {
            $column = Column::__set_state(['_columnName' => 'id', '_schemaName' => null, '_type' => 14, '_typeReference' => -1, '_typeValues' => null, '_isNumeric' => true, '_size' => 0, '_scale' => 0, '_default' => "nextval('images_id_seq'::regclass)", '_unsigned' => false, '_notNull' => true, '_primary' => false, '_autoIncrement' => true, '_first' => true, '_after' => null, '_bindType' => 1]);
            expect($column->hasDefault())->false();
            expect($column->isAutoIncrement())->true();
        });
    }