
   PASS  Tests\Feature\AdminPageSmokeTest
  ✓ parameterless get pages render without server errors                                                         8.20s  
  ✓ record pages render without server errors                                                                    4.51s  
  ✓ the administrator can reach the beds admissions and invoice capabilities                                     0.83s  

   PASS  Tests\Feature\PatientUserLinkTest
  ✓ an email match alone binds nothing                                                                           0.68s  
  ✓ an mrn lookup alone binds nothing                                                                            0.60s  
  ✓ a pending request grants nothing                                                                             0.62s  
  ✓ confirmation must come from a second person                                                                  0.58s  
  ✓ the requester cannot confirm their own request                                                               0.60s  
  ✓ the account under review cannot confirm its own binding                                                      0.57s  
  ✓ revocation ends access and keeps the record                                                                  0.60s  
  ✓ expiry stops resolution without any sweep                                                                    0.59s  
  ✓ an expired binding can be replaced by a new one                                                              0.61s  
  ✓ an account cannot be bound to two patients at once                                                           0.66s  
  ✓ a login cannot be bound across clinics                                                                       0.60s  
  ✓ a staff login cannot be bound to a record                                                                    0.58s  
  ✓ binding and revoking are both audited                                                                        0.62s  
  ✓ the seeded demo binding is created by two people                                                             0.60s  
  ✓ the screen creates only a pending request                                                                    0.59s  
  ✓ the requester is refused as confirmer on screen too                                                          0.60s  
  ✓ a login without the amend permission cannot touch bindings                                                   0.86s  
  ✓ a link of another patient is not reachable through this record                                               0.67s  
  ✓ revoking from the screen keeps the row with who did it                                                       0.67s  

   PASS  Tests\Feature\PatientWalletAccessTest
  ✓ a bound login reaches the patient wallet it is bound to                                                      0.85s  
  ✓ an unbound login reaches no wallet at all                                                                    0.82s  
  ✓ a bound login cannot open another patients wallet                                                            0.76s  
  ✓ revoking the binding closes the wallet on the next request                                                   0.92s  
  ✓ the till still reads and the ward still cannot                                                               0.90s  
  ✓ a bound login raises a qr against its own outstanding invoice                                                0.76s  
  ✓ a binding cannot reach another clinics wallet                                                                0.75s  
  ✓ the pharmacy demo tenant keeps the wallet module closed                                                      0.74s  

   PASS  Tests\Feature\PaymentCollectionTest
  ✓ an account number is ten digits and unique within the tenant                                                 0.72s  
  ✓ the same patient never gets a second account                                                                 0.72s  
  ✓ a staff wallet is also given an account number                                                               0.71s  
  ✓ a card can be issued against a patient account                                                               0.78s  
  ✓ an account number from another tenant resolves to nothing                                                    0.73s  
  ✓ an invoice number resolves to that invoices payer                                                            0.72s  
  ✓ a patient number resolves to that patients invoices                                                          0.69s  
  ✓ a ten digit account number resolves to the same payer                                                        0.70s  
  ✓ an unknown number resolves to nothing                                                                        0.72s  
  ✓ a patient number from another tenant resolves to nothing                                                     0.70s  
  ✓ an invoice reference is matched exactly and not by prefix                                                    0.70s  
  ✓ one collection settles several invoices and writes one row each                                              0.73s  
  ✓ paying everything in full marks each invoice paid                                                            0.70s  
  ✓ more than an invoice owes is refused and nothing is written                                                  0.69s  
  ✓ a refused line rolls back the whole collection                                                               0.70s  
  ✓ a line cannot name an invoice owed by someone else                                                           0.70s  
  ✓ an invoice from another tenant cannot be named at all                                                        0.73s  
  ✓ collecting from the payers account debits it once                                                            0.72s  
  ✓ an account cannot be collected past its balance                                                              0.70s  
  ✓ a payment point that does not accept the method refuses it                                                   0.71s  
  ✓ an inactive payment point refuses to collect                                                                 0.69s  
  ✓ an account may not be empty                                                                                  0.69s  
  ✓ a wallet funded collection records a valid invoice payment channel                                           0.69s  
  ✓ the same invoice cannot be listed twice in one collection                                                    0.71s  
  ✓ the till screen lists a payers invoices for an authenticated cashier                                         0.80s  
  ✓ the till screen offers the settled and draft invoices nothing                                                0.80s  
  ✓ the till screen reports an unknown number without disclosing anything                                        0.82s  
  ✓ collecting over http settles the invoice and shows a receipt                                                 0.81s  
  ✓ a receipt can be reopened by its reference                                                                   0.80s  
  ✓ another clinics receipt reference reopens nothing                                                            0.71s  
  ✓ only the finance roles can open the till                                                                     1.70s  
  ✓ a user without collect rights cannot open the till                                                           0.81s  
  ✓ a user without collect rights cannot post a collection                                                       0.83s  
  ✓ the legacy payment point collect door is gated too                                                           0.84s  
  ✓ a cashier cannot point the till at another clinics patient                                                   0.70s  

   WARN  Tests\Feature\QrPaymentTest
  ✓ creating an invoice auto issues a qr code                                                                    0.83s  
  ✓ an invoice that becomes payable gets a qr code                                                               0.71s  
  ✓ transitioning a draft to issued issues a qr code                                                             0.70s  
  ✓ a draft invoice is not issued a qr code                                                                      0.68s  
  ✓ every payable invoice in the demo data has a qr code                                                         0.70s  
  ✓ voiding an invoice retires its active qr code                                                                0.71s  
  ✓ a settled invoice is not issued a qr code                                                                    0.70s  
  ✓ a qr code can be scanned at a payment point                                                                  0.75s  
  ✓ a qr code cannot be used twice                                                                               0.77s  
  ✓ an expired qr code is refused and marked expired                                                             0.72s  
  ✓ the qr screen renders a real qr image                                                                        0.81s  
  ✓ the wallet screen links to qr creation                                                                       0.80s  
  ✓ the qr create screen offers the outstanding invoices                                                         0.80s  
  ✓ a qr code can be created for an outstanding invoice                                                          0.69s  
  ✓ a qr code can be created for a specific amount                                                               0.76s  
  - a qr code cannot be raised against another patients invoice → Fixture needs a second patient with a payable… 0.69s  
  ✓ a qr code cannot be raised against a settled invoice                                                         0.69s  
  ✓ a qr code requires an amount or an invoice                                                                   0.68s  
  ✓ a qr code from another clinic does not resolve across tenants                                                0.69s  

   PASS  Tests\Feature\SandboxPaymentPolicyTest
  ✓ the application makes no outbound http calls                                                                 0.06s  
  ✓ the cards table cannot hold a full card number or cvv                                                        0.02s  
  ✓ issuing a card persists only a mask and a uid                                                                0.58s  
  ✓ the demo login harness is disabled outside a demo environment                                                0.02s  
  ✓ sandbox status does not relax the overdraft guard                                                            0.58s  

   PASS  Tests\Feature\UngatedRouteGuardTest
  ✓ a patient cannot reach with data set "payment points index"                                                  0.80s  
  ✓ a patient cannot reach with data set "payment points create form"                                            0.78s  
  ✓ a patient cannot reach with data set "payment points edit"                                                   0.78s  
  ✓ a patient cannot reach with data set "wards index"                                                           0.76s  
  ✓ a patient cannot reach with data set "wards create form"                                                     0.79s  
  ✓ a patient cannot reach with data set "wards edit"                                                            0.78s  
  ✓ a patient cannot reach with data set "tariffs index"                                                         0.79s  
  ✓ a patient cannot reach with data set "tariffs create form"                                                   0.79s  
  ✓ a patient cannot reach with data set "tariffs edit"                                                          0.76s  
  ✓ a patient cannot reach with data set "product catalogue index"                                               0.78s  
  ✓ a patient cannot reach with data set "product catalogue create form"                                         0.77s  
  ✓ a patient cannot reach with data set "product catalogue edit"                                                0.75s  
  ✓ a patient cannot reach with data set "drug administrations index"                                            0.79s  
  ✓ a patient cannot reach with data set "drug administrations create form"                                      0.79s  
  ✓ a patient cannot reach with data set "drug administrations edit"                                             0.82s  
  ✓ a patient cannot reach with data set "another patients wallet"                                               0.71s  
  ✓ a patient cannot reach with data set "another patients wallet edit"                                          0.74s  
  ✓ a patient cannot reach with data set "another patients q r codes"                                            0.73s  
  ✓ a patient cannot reach with data set "another patients q r create form"                                      0.69s  
  ✓ a patient cannot reach with data set "another accounts card"                                                 0.71s  
  ✓ a patient cannot reach with data set "another accounts card edit"                                            0.70s  
  ✓ a patient cannot write to the product catalogue                                                              0.80s  
  ✓ a patient cannot rename a ward                                                                               0.95s  
  ✓ the patient keeps their own wallet and card door                                                             1.06s  
  ✓ a patient cannot read a qr code issued to someone else                                                       0.73s  
  ✓ the administrator still administers                                                                          1.53s  
  ✓ the till operator sees prices but cannot change them                                                         1.40s  
  ✓ the clinician reaches the clinical screens the administrator cannot                                          0.99s  
  ✓ a foreign clinic cannot read a ward even holding the permission                                              0.74s  

   PASS  Tests\Feature\WalletPaymentTest
  ✓ a wallet is created on first access and starts empty                                                         0.74s  
  ✓ a credit increases the balance and is recorded                                                               0.73s  
  ✓ a debit reduces the balance                                                                                  0.74s  
  ✓ a credit of zero or less is refused                                                                          0.72s  
  ✓ a debit of zero or less is refused                                                                           0.75s  
  ✓ a wallet cannot be overdrawn                                                                                 0.73s  
  ✓ an inactive wallet cannot be spent from                                                                      0.76s  
  ✓ an issued card is masked and carries no full pan                                                             0.72s  
  ✓ tap to pay debits the card wallet at the payment point                                                       0.75s  
  ✓ a frozen card cannot be used for tap to pay                                                                  0.77s  
  ✓ a qr scan deducts from the wallet                                                                            0.76s  
  ✓ a qr code cannot be reused                                                                                   0.75s  
  ✓ an expired qr code is refused and marked expired                                                             0.70s  
  ✓ cash collection records against the invoice without touching a wallet                                        0.70s  
  ✓ an unknown payment method is refused                                                                         0.70s  
  ✓ a payment point cannot collect a non positive amount                                                         0.78s  
  ✓ wallet transactions are not reachable from another tenant                                                    0.70s  
  ✓ a card is not reachable from another tenant                                                                  0.77s  
  ✓ a qr code is not reachable from another tenant                                                               0.70s  

  Tests:    1 skipped, 136 passed (623 assertions)
  Duration: 112.25s

