public function testFetchAdminListing() { $fruits = $this->table->fetchAdminListing(); $this->assertInternalType('array', $fruits); $this->assertSame(5, count($fruits)); $previousFruitId = 0; foreach ($fruits as $fruit) { $this->assertInternalType('array', $fruit); $this->assertArrayHasKey('dewdrop_test_fruit_id', $fruit); $this->assertGreaterThan($previousFruitId, $fruit['dewdrop_test_fruit_id']); $previousFruitId = $fruit['dewdrop_test_fruit_id']; $this->assertArrayHasKey('name', $fruit); $this->assertArrayHasKey('is_delicious', $fruit); $this->assertArrayHasKey('level_of_deliciousness', $fruit); } }
/** * @expectedException \Dewdrop\Exception */ public function testCannotUnsetColumnWithArraySyntax() { $row = $this->table->createRow(); unset($row['name']); }