Permalink
Browse files

Testing Countable interface

  • Loading branch information...
mthenw committed May 20, 2012
1 parent b804499 commit 20f8b28fe34b50bd9288a6bb5978d0f934f17a9a
Showing with 14 additions and 0 deletions.
  1. +14 −0 tests/NoSQLite/Tests/StoreTest.php
@@ -173,6 +173,20 @@ public function testDeleteAll()
$this->assertEquals(array(), $this->store->getAll());
}
+ /**
+ * Test Countable interface
+ *
+ * @return void
+ */
+ public function testCount()
+ {
+ $count = rand(1, 100);
+ for ($i = 0; $i < $count; $i++) {
+ $this->store->set(uniqid(), uniqid());
+ }
+ $this->assertEquals($count, count($this->store));
+ }
+
/**
* Data provider - valid data
*

0 comments on commit 20f8b28

Please sign in to comment.