createMock(ScopeConfigInterface::class); $scopeConfig->expects(self::once()) ->method('getValue') ->with(Config::XML_PATH_CANCEL_PENDING_AFTER, ScopeConfigInterface::SCOPE_TYPE_DEFAULT) ->willReturn('45'); self::assertSame(45, (new Config($scopeConfig))->getCancellationLifetimeMinutes()); } public function testNegativeLifetimeDisablesCancellation(): void { $scopeConfig = $this->createMock(ScopeConfigInterface::class); $scopeConfig->method('getValue')->willReturn('-10'); self::assertSame(0, (new Config($scopeConfig))->getCancellationLifetimeMinutes()); } }