示例#1
0
 public function testSelectSingleAndCellWithoutFrom()
 {
     $db = new Database($this->pdo);
     $artists = $db->select('artists');
     $first_album = $db->single('albums');
     $song_name = $db->cell('name', 'songs');
     $this->assertEquals(3, count($artists));
     $this->assertEquals(4, count($first_album));
     $this->assertTrue(array_key_exists('artist_id', $first_album));
     $this->assertTrue(is_string($song_name));
     $this->assertEquals('Hummer', $song_name);
 }