mirror of
				https://github.com/alchemy-fr/Phraseanet.git
				synced 2025-10-27 20:03:15 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			400 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			400 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| use Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface;
 | |
| 
 | |
| /**
 | |
|  * This class is used to provide CRSF token in PHPUNIT test suite.
 | |
|  */
 | |
| class CsrfTestProvider implements CsrfProviderInterface
 | |
| {
 | |
|     public function generateCsrfToken($intention)
 | |
|     {
 | |
|         return mt_rand();
 | |
|     }
 | |
| 
 | |
|     public function isCsrfTokenValid($intention, $token)
 | |
|     {
 | |
|         return true;
 | |
|     }
 | |
| }
 | 
