Yii2 Bootstrap 3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
687 B

12 years ago
<?php
namespace yiiunit\framework\rbac;
12 years ago
use Yii;
12 years ago
use yii\rbac\PhpManager;
12 years ago
//require_once(__DIR__ . '/ManagerTestBase.php');
12 years ago
class PhpManagerTest extends ManagerTestBase
{
12 years ago
protected function setUp()
12 years ago
{
12 years ago
parent::setUp();
$this->mockApplication();
12 years ago
$authFile = Yii::$app->getRuntimePath() . '/rbac.php';
12 years ago
@unlink($authFile);
$this->auth = new PhpManager;
$this->auth->authFile = $authFile;
$this->auth->init();
$this->prepareData();
}
12 years ago
protected function tearDown()
12 years ago
{
12 years ago
parent::tearDown();
12 years ago
@unlink($this->auth->authFile);
}
public function testSaveLoad()
{
$this->auth->save();
$this->auth->clearAll();
$this->auth->load();
$this->testCheckAccess();
}
}