Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 /**
  * @expectedException \Dewdrop\Exception
  */
 public function testCannotUnsetColumnWithArraySyntax()
 {
     $row = $this->table->createRow();
     unset($row['name']);
 }