Use Native Session functions (global "$_SESSION" variable) for Memory class because of the direct usage of the $_SESSION class all around the codebase
This commit is contained in:
		
					parent
					
						
							
								eca3396851
							
						
					
				
			
			
				commit
				
					
						b9f8762eb3
					
				
			
		
					 4 changed files with 13 additions and 73 deletions
				
			
		| 
						 | 
				
			
			@ -11,6 +11,7 @@ use Friendica\BaseObject;
 | 
			
		|||
use Friendica\Core\Config\Configuration;
 | 
			
		||||
use Friendica\Core\Config\PConfiguration;
 | 
			
		||||
use Friendica\Core\Protocol;
 | 
			
		||||
use Friendica\Core\Session\ISession;
 | 
			
		||||
use Friendica\Core\System;
 | 
			
		||||
use Friendica\Database\Database;
 | 
			
		||||
use Friendica\Network\HTTPException;
 | 
			
		||||
| 
						 | 
				
			
			@ -111,6 +112,10 @@ class ApiTest extends DatabaseTest
 | 
			
		|||
		// User ID that we know is not in the database
 | 
			
		||||
		$this->wrongUserId = 666;
 | 
			
		||||
 | 
			
		||||
		/** @var ISession $session */
 | 
			
		||||
		$session = BaseObject::getClass(ISession::class);
 | 
			
		||||
		$session->start();
 | 
			
		||||
 | 
			
		||||
		// Most API require login so we force the session
 | 
			
		||||
		$_SESSION = [
 | 
			
		||||
			'allow_api'     => true,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue