# sync-basalam/trunk/tests/Services/ForceUpdateGateTest.php

ووسلام – همگام سازی ووکامرس و باسلام, version trunk. 35 lines.

- Page: https://pluginprobe.com/plugins/sync-basalam/trunk/code/tests/Services/ForceUpdateGateTest.php
- Raw: https://pluginprobe.com/plugins/sync-basalam/trunk/raw/tests/Services/ForceUpdateGateTest.php
- Modified: 2026-09-08T12:26:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/sync-basalam/trunk/code/tests/Services/ForceUpdateGateTest.php#L10-L20`.

```php
<?php

namespace SyncBasalam\Tests\Services;

use PHPUnit\Framework\TestCase;
use SyncBasalam\Services\ForceUpdateGate;

class ForceUpdateGateTest extends TestCase
{
    public function testDoesNotBlockWhenForceUpdateIsDisabled(): void
    {
        self::assertFalse(ForceUpdateGate::shouldBlock(false, '1.10.15', '1.10.15'));
    }

    public function testBlocksTheVersionThatReceivedTheForceUpdateFlag(): void
    {
        self::assertTrue(ForceUpdateGate::shouldBlock(true, '1.10.15', '1.10.15'));
    }

    public function testAllowsANewerPackageToRecoverFromTheStoredFlag(): void
    {
        self::assertFalse(ForceUpdateGate::shouldBlock(true, '1.10.15', '1.10.16'));
    }

    public function testIgnoresUnknownHotfixVersionReportedAsForcedByTheApi(): void
    {
        self::assertFalse(ForceUpdateGate::shouldHonorRemoteFlag(true, '1.10.16', '1.10.14'));
    }

    public function testHonorsForceUpdateForAnOutdatedPublishedVersion(): void
    {
        self::assertTrue(ForceUpdateGate::shouldHonorRemoteFlag(true, '1.10.13', '1.10.14'));
    }
}

```
