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.
		
		
		
		
		
			
		
			
				
					
					
						
							35 lines
						
					
					
						
							636 B
						
					
					
				
			
		
		
	
	
							35 lines
						
					
					
						
							636 B
						
					
					
				| <?php | |
|  | |
| namespace yiiunit\framework\rbac; | |
|  | |
| use Yii; | |
| use yii\rbac\PhpManager; | |
|  | |
| class PhpManagerTest extends ManagerTestCase | |
| { | |
| 	protected function setUp() | |
| 	{ | |
| 		parent::setUp(); | |
| 		$this->mockApplication(); | |
| 		$authFile = Yii::$app->getRuntimePath() . '/rbac.php'; | |
| 		@unlink($authFile); | |
| 		$this->auth = new PhpManager; | |
| 		$this->auth->authFile = $authFile; | |
| 		$this->auth->init(); | |
| 		$this->prepareData(); | |
| 	} | |
|  | |
| 	protected function tearDown() | |
| 	{ | |
| 		parent::tearDown(); | |
| 		@unlink($this->auth->authFile); | |
| 	} | |
|  | |
| 	public function testSaveLoad() | |
| 	{ | |
| 		$this->auth->save(); | |
| 		$this->auth->clearAll(); | |
| 		$this->auth->load(); | |
| 		$this->testCheckAccess(); | |
| 	} | |
| }
 | |
| 
 |