add_role( 'test', 'Test Role', array(
'read' => true, // True allows that capability
'edit_posts' => true, // Allows user to edit their own posts
'publish_posts'=>true, //Allows the user to publish, otherwise posts stays in draft mode
'edit_published_posts'=>true,
'upload_files'=>true,
'delete_published_posts'=>true,
));