setScope([ IToken::SCOPE_FILESYSTEM => true ]); \OC::$server->get('LockdownManager')->setToken($token); parent::tearDown(); } protected function setUp(): void { parent::setUp(); $token = new PublicKeyToken(); $token->setScope([ IToken::SCOPE_FILESYSTEM => false ]); \OC::$server->get('LockdownManager')->setToken($token); $this->createUser('foo', 'var'); } public function testSetupFS(): void { \OC_Util::tearDownFS(); \OC_Util::setupFS('foo'); $this->assertInstanceOf(NullStorage::class, Filesystem::getStorage('/foo/files')); } }