Skip to content

Commit

Permalink
Added a test for hasColumn().
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Pustułka committed May 29, 2017
1 parent 3f270c8 commit b9d2d87
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/TestCase/Database/Schema/TableTest.php
Expand Up @@ -104,6 +104,21 @@ public function testAddColumn()
$this->assertEquals(['title', 'body'], $table->columns());
}

/**
* Test hasColumn() method.
*
* @return void
*/
public function testHasColumn()
{
$schema = new Table('articles', [
'title' => 'string'
]);

$this->assertTrue($schema->hasColumn('title'));
$this->assertFalse($schema->hasColumn('body'));
}

/**
* Test removing columns.
*
Expand Down

0 comments on commit b9d2d87

Please sign in to comment.