コード例 #1
0
ファイル: SuperUserTest.php プロジェクト: Benjen/red_test
 /**
  * Make sure that superuser has access to create an article.
  */
 public function testCreateAccess()
 {
     $path = new Path('node/add/article');
     $this->assertTrue($path->hasAccess(), 'Superuser does not have access to create an article.');
     $this->assertTrue(Article::hasCreateAccess(), "Superuser does not have access to create an article.");
 }
コード例 #2
0
 /**
  * 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.");
 }