milestones-7-10-test.php
Source file: tests/backend/milestones-7-10-test.php
Module: tests-backend
Size: 45 lines
SHA-256: 3efcafc449d8dd90a5c9dfecb8a20c3732ebc819972a7f1678153f9e3db33340
Responsibility
Checks PHP backend assumptions; database doubles are not live MariaDB evidence.
Declared entry points
check_m7— source line 12.rejects_m7— source line 13.
Imports and dependencies
- Line 3:
require_once __DIR__.'/../../backend/bootstrap.php'; - Line 4:
use Hslg\Backend\Services\Payments\ServerPricedBasket; - Line 5:
use Hslg\Backend\Services\Payments\VerifiedStripeReceipt; - Line 6:
use Hslg\Backend\PaymentModules\Stripe\OfficialStripeWebhookVerifier; - Line 7:
use Hslg\Backend\PaymentModules\Stripe\OfficialStripePaymentGateway; - Line 8:
use Hslg\Backend\Database\Migrations\PaymentSchemaV4; - Line 9:
use Hslg\Backend\Database\TableNames;
Behaviour and audit locations
- Line 5:
use Hslg\Backend\Services\Payments\VerifiedStripeReceipt; - Line 6:
use Hslg\Backend\PaymentModules\Stripe\OfficialStripeWebhookVerifier; - Line 7:
use Hslg\Backend\PaymentModules\Stripe\OfficialStripePaymentGateway; - Line 31:
check_m7(VerifiedStripeReceipt::reconcile($expected,$intent)==='payment_confirmed','verified payment confirmation'); - Line 32:
check_m7(VerifiedStripeReceipt::reconcile($expected,[...$intent,'status'=>'processing'])==='payment_unknown','processing unknown'); - Line 33:
check_m7(VerifiedStripeReceipt::reconcile($expected,[...$intent,'status'=>'requires_payment_method'])==='payment_failed','failed payment'); - Line 34:
rejects_m7(fn()=>VerifiedStripeReceipt::reconcile($expected,[...$intent,'amount'=>1]),'reject amount mismatch'); - Line 35:
rejects_m7(fn()=>VerifiedStripeReceipt::reconcile($expected,[...$intent,'metadata'=>['hslg_order_id'=>'else','hslg_venue_id'=>'tap-yard']]),'reject wrong order');
Relationship to the system
This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.
Change verification
Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.