AdminObjectAclManipulatorTest.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sonata\AdminBundle\Tests\Controller;
  11. use Sonata\AdminBundle\Util\AdminObjectAclManipulator;
  12. /**
  13. * @author Kévin Dunglas <kevin@les-tilleuls.coop>
  14. */
  15. class AdminObjectAclManipulatorTest extends \PHPUnit_Framework_TestCase
  16. {
  17. const MASK_BUILDER_CLASS = '\Symfony\Component\Security\Acl\Permission\MaskBuilder';
  18. protected function createAdminObjectAclManipulator()
  19. {
  20. return new AdminObjectAclManipulator($this->getMock('Symfony\Component\Form\FormFactoryInterface'), self::MASK_BUILDER_CLASS);
  21. }
  22. public function testGetMaskBuilder()
  23. {
  24. $adminObjectAclManipulator = $this->createAdminObjectAclManipulator();
  25. $this->assertSame(self::MASK_BUILDER_CLASS, $adminObjectAclManipulator->getMaskBuilderClass());
  26. }
  27. }