/** * Searching for the deleted playlist in the remained ones, * if the result is '0', the delete was successful. * * @depends testDeletePlaylist * @param Playlist $playlist */ public function testCheckDeletePlaylist(Playlist $playlist) { $playlist_id = $playlist->getId(); $this->cms->deletePlaylist($playlist_id); $playlistsList = $this->cms->listPlaylists(); $match = 0; foreach ($playlistsList as $plist) { if ($plist->getId() === $playlist_id) { $match++; } } $this->assertEquals(0, $match, "Playlist has been deleted successfully."); }
/** * Creates an empty playlist object with a random name. * * @return Playlist */ protected function createRandomPlaylistObject() { $playlist = new Playlist(); $playlist->setName(uniqid('brightcove_api_test_', TRUE)); return $playlist; }