fixtures\AccountFixture::class, 'oauthSessions' => fixtures\OauthSessionFixture::class, 'minecraftAccessKeys' => fixtures\MinecraftAccessKeyFixture::class, 'authSessions' => fixtures\AccountSessionFixture::class, ]; } public function testExecute() { /** @var \common\models\Account $bannedAccount */ $bannedAccount = $this->tester->grabFixture('accounts', 'banned-account'); $task = new ClearAccountSessions($bannedAccount->id); $task->execute($this->createMock(Queue::class)); $this->assertEmpty($bannedAccount->sessions); $this->assertEmpty($bannedAccount->minecraftAccessKeys); $this->assertEmpty($bannedAccount->oauthSessions); } }