<?php

namespace Test\Club;

use Game\Config\GameConfig;
use Game\Logic\Club\ClubLogic;
use Game\Logic\Club\ClubStoreLogic;
use Test\TestBase;
use Framework\Logic\TemplateHelp;
use Tool\LoadTemplate\Config;

class TestClub extends TestBase
{
    use ClubLogic;
    use ClubStoreLogic;

    public function getPlayerId(): int
    {
        // lmf
        return 288455193578151367;
        // lmf1
//        return 288377755317272027;
    }


    public function startTest()
    {
//        $this->createClub(1,1,'111', [1=>1]);
//        $this->changeClub(10000000, 1, 2);
//        $this->changeClubNotice(10000000, '三二一 ！ 加油！');
//        $this->changeTag(10000000, [1, 2, 3]);
//        $this->requestJoinClub(10000000);
//        $this->approvalJoin(10000000, 288421452314650945, true, 'aaa', 1);
//        $this->changePlayerPost(10000000, 288377755317272027, 2, 1);
//        $this->delClubMember(10000000, 288457826392432250);
//        $this->exitClub();
//        $this->getClubInfo(10000000);
//        $this->searchClubByCondition(10000000);
//        $this->searchClubByCondition('111');
//        $this->disbandClub(10000000);
//        $this->getStoreRecord();
//        $this->buyClubStoreItem(1, 1);

        // ipcs del

        foreach (Config::FILE_LIST as $type => $v) {
            $cacheId = $this->makeCacheId($type);
            $shmId = shm_attach($cacheId);
            if($shmId == false) {
                continue;
            }
            echo $cacheId;
//            shm_detach($shmId);
            $status = shm_detach($shmId);
            echo $status;
            shm_remove($shmId);
        }
    }

}

