Skip to content
Browse files

Fix count test

  • Loading branch information...
1 parent ccb8c57 commit 5647c0aaea5c0b7b01dee823ff857459b90d1185 @wdavidw wdavidw committed
Showing with 8 additions and 7 deletions.
  1. +8 −7 tests/tables/TablesCountableTest.php
View
15 tests/tables/TablesCountableTest.php
@@ -17,13 +17,14 @@
class TablesCountableTest extends PopHbaseTestCase{
public function testCount(){
$hbase = $this->hbase;
- // Test with no table
+ // Count the number of tables
$tables = $hbase->tables();
- $this->assertSame(0,count($tables));
- // Test with one table
-// $hbase->tables->create('pop_hbase');
-// $this->assertSame(1,count($tables));
-// $this->assertTrue($tables->current() instanceof PopHbaseTable);
-// $hbase->tables->delete('pop_hbase');
+ $count = count($tables);
+ // Add a new table
+ $hbase->tables->create('pop_hbase_test1','column_family');
+ $this->assertSame($count+1,count($tables));
+ // Drop the table
+ $hbase->tables->delete('pop_hbase_test1');
+ $this->assertSame($count,count($tables));
}
}

0 comments on commit 5647c0a

Please sign in to comment.
Something went wrong with that request. Please try again.