Beispiel #1
0
 /**
  * Make sure that superuser has permission to delete his own comment.
  *
  * @depends testCommentReply
  */
 public function testCommentDeleteAccess()
 {
     $path = new Path('comment/' . self::$articleCommentObject->getId() . '/delete');
     $this->assertTrue($path->hasAccess(), "Superuser is not able to delete his own comment.");
 }
Beispiel #2
0
 /**
  * Make sure that superuser has access to delete the article.
  *
  * @depends testView
  */
 public function testDeleteAccess()
 {
     $path = new Path('node/' . self::$articleId . '/delete');
     $this->assertTrue($path->hasAccess(), 'Superuser does not have access to edit an article.');
     $articleObject = new Article(self::$articleId);
     $articleObject->verify($this);
     $this->assertTrue($articleObject->hasUpdateAccess(), "Superuser does not have access to create an article.");
 }
Beispiel #3
0
 /**
  * Make sure that anonymous user is not able to delete a comment.
  */
 public function testCommentDeleteAccess()
 {
     $path = new Path('comment/' . self::$articleCommentObject->getId() . '/delete');
     $this->assertFalse($path->hasAccess(), "Authenticated user is able to delete a comment.");
 }
 /**
  * Make sure that the authenticated user has access to create an article.
  */
 public function testCreateAccess()
 {
     $path = new Path('node/add/article');
     $this->assertFalse($path->hasAccess(), 'Authenticated user has access to create an article.');
     $this->assertFalse(Article::hasCreateAccess(), "Authenticated user has access to create an article.");
 }