redis = Redis::connection(); $this->redis->flushall(); } public function testGetClient($appName = 'Call For Presentations'):Client { $repo = EntityManager::getRepository(Client::class); $client = $repo->getByApplicationName($appName); $this->assertTrue(!is_null($client)); $this->assertTrue($client->getApplicationName() == $appName); $accessTokens = $client->getValidAccessTokens(); $this->assertTrue(count($accessTokens) == 0); return $client; } public function testClearAccessTokens(){ $client = $this->testGetClient(); $this->assertTrue($client->hasAccessTokens()); $client->removeAllAccessTokens(); EntityManager::flush(); } }