private function removeAlbum($aid) { Api_Dao_Album::delete($aid); }
public function testautoincrementIntoDb() { $coverPid = 5; $created = 345; $description = "cvsUrl"; $location = "234"; $modified = 234; $name = "cvsUrl"; $owner = 543; $aid = null; try { $numRows = $this->getNumAllAlbums(); //$aid = Api_Dao_Album::createAlbum($coverPid, $created, $description, $location, $modified, $name, $owner); $aid = Api_Dao_Album::createAlbum($coverPid, $description, $location, $name, $owner); $this->assertTrue($aid != false); $this->assertEquals($numRows + 1, $this->getNumAllAlbums()); $row = $this->getAlbum($aid); $this->assertEquals($aid, $row['aid']); $this->assertEquals($coverPid, $row['cover_pid']); $this->assertEquals($description, $row['description']); $this->assertEquals($location, $row['location']); $this->assertEquals($name, $row['name']); $this->assertEquals($owner, $row['owner']); } catch (Exception $exception) { Api_Dao_Album::delete($aid); throw $exception; } Api_Dao_Album::delete($aid); $this->assertEquals($numRows, $this->getNumAllAlbums()); }