use Shopware\Core\Test\Stub\SystemConfigService\StaticSystemConfigService;
/**
* @internal
*
* @covers \Shopware\Core\System\UsageData\Approval\ApprovalDetector
*/
class ApprovalDetectorTest extends TestCase
{ public function testNeedsApprovalReturnsThePassedInParameter(): void
{ $approvalDetector =
new ApprovalDetector(false,
new StaticSystemConfigService());
static::
assertFalse($approvalDetector->
needsApprovalRequest());
$approvalDetector =
new ApprovalDetector(true,
new StaticSystemConfigService());
static::
assertTrue($approvalDetector->
needsApprovalRequest());
} public function testApprovalIsNotRequestedIfConfigValueIsNotSet(): void
{ $approvalDetector =
new ApprovalDetector(true,
new StaticSystemConfigService());