Testing | url-signer-go | Spatie       

 SPATIE  

url-signer-go
=============

spatie.be/open-source

  [Docs](https://spatie.be/docs)  [Url-signer-go](https://spatie.be/docs/url-signer-go/v1)  Testing

 Version   v1      

 Other versions for crawler [v1](https://spatie.be/docs/url-signer-go/v1) 

  Testing    
- [ Introduction ](https://spatie.be/docs/url-signer-go/v1/introduction)
- [ Installation and setup ](https://spatie.be/docs/url-signer-go/v1/installation-and-setup)
- [ Usage ](https://spatie.be/docs/url-signer-go/v1/usage)
- [ Testing ](https://spatie.be/docs/url-signer-go/v1/testing)
- [ Releasing ](https://spatie.be/docs/url-signer-go/v1/releasing)
- [ Changelog ](https://spatie.be/docs/url-signer-go/v1/changelog)
- [ Support us ](https://spatie.be/docs/url-signer-go/v1/support-us)

 Testing
=======

Run `go test -race ./...` to execute the tests and examples. Run `go vet ./...` for static checks and `go mod tidy -diff` to check dependency metadata. Format code with `gofmt -w .`.

The normal suite checks exact URLs and validation outcomes against committed PHP-generated fixtures. It also tests custom signing functions, key overrides, query parameter names, invalid configuration, concurrent validation and expiry boundaries. Public examples execute as Go examples.

To run live differential checks, clone `spatie/url-signer`, check out commit `3cddceff31fcbffc19ee21e5abf7cbf6c196292e`, install PHP 8.3 or newer, and set `PHP_URL_SIGNER_SOURCE` to that checkout's absolute path:

```
PHP_URL_SIGNER_SOURCE=/path/to/url-signer go test -race -run TestPHPDifferential -v
```

The oracle calls the real PHP package for exact signing and validation before, at and after expiration. The cases include seeded combinations of query arrays, overwrites, malformed encodings, duplicate keys, parser limits, legacy MD5 and SHA256. This test is optional locally and required in CI on PHP 8.3 and 8.4. Go-only fixtures run on Linux, macOS and Windows.

 A good
match?
-------------

### What we do best

- All things Laravel
- Custom frontend components
- Building APIs
- AI-powered features
- Simplifying things
- Clean solutions
- Integrating services

### Not our cup of tea

- WordPress themes
- Cutting corners
- Free mockups to win a job
- "Just execute the briefing"

 In short: we'd like to be a **substantial part** of your project.

 [ Get in touch via email ](mailto:info@spatie.be?subject=A%20good%20match%21&body=Tell%20us%20as%20much%20as%20you%20can%20about%0A-%20your%20online%20project%0A-%20your%20planning%0A-%20your%20budget%0A-%20%E2%80%A6%0A%0AAnything%20that%20helps%20us%20to%20start%20straightforward%21)
