1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 08:10:07 +01:00

5 Commits

Author SHA1 Message Date
Matt Stauffer
5c7b2d313a Add support for .valetrc (#1347)
* Add .valetrc support

* Apply fixes from StyleCI

* wip

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-01-18 20:44:51 -05:00
Matt Stauffer
e5e0e03799 Add a bunch more CLI command tests (#1332)
* Wip some cli tests

* Apply fixes from StyleCI

* Test parked command

* Test forget command

* Update Filesystem::rmDirAndContents to respect symlinks

* Wip cli commands

* Apply fixes from StyleCI

* Test link command, unlink command, and secure command

* Apply fixes from StyleCI

* Add tests for unsecure, unsecure --all, secured commands

Add placeholders for the remaining CLI commands
Add nginx::restart to unsecure --all command

Co-authored-by: StyleCI Bot <bot@styleci.io>
2022-12-30 15:07:34 -05:00
Mikaël Popowicz
ea777a9e94 Adding ability to create unsecure proxy. 2020-11-28 23:22:07 +01:00
Beau Simensen
1959e95c50 Stops interfering with favicon and robots for proxies 2020-05-06 15:56:59 -05:00
Beau Simensen
9f607ba998 Test the new Proxies features
Updated the `proxies` method to return the URL + .tld
as the rendered output wasn't exactly what one would
expect. While not critical, it was not consistent.

Refactored some of the Site class to aid in testing using
a fake instead of relying on a ton of mocking.

The Site fake has support for both using `tests/output`
as well as named fixtures (`tests/fixtures/Proxies`).

Testing for certificate I/O is pretty whack, but this is
the best I could come up with that would still ensure
the certificate stuff was getting called without
actually requiring `sudo` to run phpunit.

Replaced instances referring directly to `VALET_HOME_PATH`
with calls to the new `valetHomePath()`. This method
is taken over in the fake Site implementation so
that everything runs the same using the fake
Site without having to change other
assumptions.

Updated several "path" methods (and many of their usages)
to take the "thing" you are looking for so you can
either get the path to the type of "thing" you
are looking for or the direct path to the
specific "thing" you are looking for.

Examples:

```
// ~/.config/valet/Nginx
$site->nginxPath();

// ~/.config/valet/Nginx/some-site.com.test
$site->nginxPath('some-site.com.test');
```

Made some other tests related to the existence of `Sites`
directory that resulted in updating the mocks for
many of the other tests.

All in all, it should make other aspects of the Site class
handle things more gracefully if `Sites` doesn't exist.
2020-04-28 11:47:25 -05:00