コード例 #1
0
ファイル: AdminTest.php プロジェクト: drmjo/SonataAdminBundle
 public function testIsAclEnabled()
 {
     $postAdmin = new PostAdmin('sonata.post.admin.post', 'NewsBundle\\Entity\\Post', 'SonataNewsBundle:PostAdmin');
     $this->assertFalse($postAdmin->isAclEnabled());
     $commentAdmin = new CommentAdmin('sonata.post.admin.comment', 'Application\\Sonata\\NewsBundle\\Entity\\Comment', 'SonataNewsBundle:CommentAdmin');
     $commentAdmin->setSecurityHandler($this->getMock('Sonata\\AdminBundle\\Security\\Handler\\AclSecurityHandlerInterface'));
     $this->assertTrue($commentAdmin->isAclEnabled());
 }