mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +05:30 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			680 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			680 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
declare(strict_types=1);
 | 
						|
 | 
						|
namespace api\tests\functional;
 | 
						|
 | 
						|
use api\tests\FunctionalTester;
 | 
						|
use Codeception\Example;
 | 
						|
 | 
						|
class LogoutCest {
 | 
						|
 | 
						|
    /**
 | 
						|
     * @dataProvider getLogoutCases
 | 
						|
     */
 | 
						|
    public function logout(FunctionalTester $I, Example $example) {
 | 
						|
        $I->amAuthenticated($example[0]);
 | 
						|
        $I->sendPOST('/api/authentication/logout');
 | 
						|
        $I->canSeeResponseContainsJson([
 | 
						|
            'success' => true,
 | 
						|
        ]);
 | 
						|
    }
 | 
						|
 | 
						|
    protected function getLogoutCases() {
 | 
						|
        yield 'active account' => ['admin'];
 | 
						|
        yield 'account that not accepted the rules' => ['Veleyaba'];
 | 
						|
        yield 'account marked for deleting' => ['DeletedAccount'];
 | 
						|
    }
 | 
						|
 | 
						|
}
 |