fixtures\AccountFixture::class, 'oauthSessions' => fixtures\OauthSessionFixture::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->oauthSessions); } }