1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 16:50:09 +01:00
Commit Graph

15 Commits

Author SHA1 Message Date
Beau Simensen
9848bc71b8 Forgot no proxies 2020-04-28 18:29:24 -05:00
Beau Simensen
02749e9e21 Add mocks to get tld 2020-04-28 18:25:02 -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
James Barnard
cb8d971097 Ignore parked paths that are not directory when getting parked sites 2019-10-21 22:56:10 +01:00
James Barnard
b16559a450 Merge branch 'master' into feature/links-with-parked 2019-10-04 07:30:35 +01:00
James Barnard
c89f64f3e6 Fix incorrect new test name 2019-10-02 13:58:47 +01:00
James Barnard
e5dceb2bc5 Check for tld on end of certificate file name to support multi segment tld's 2019-10-02 13:56:51 +01:00
James Barnard
9d4126856d Add 'parked' command to show all sites which have been parked using valet park 'path' 2019-10-02 13:31:06 +01:00
Colin DeCarlo
20afe84f36 Move the helper functions into the Valet namespace 2018-06-20 16:01:37 -04:00
Matt Stauffer
a7777690ee Add a test that https is parsed correctly for non .dev domains in valet links 2018-01-05 13:16:39 -05:00
Taylor Otwell
a058c1251e remove logs method 2016-09-21 09:52:12 -05:00
Lucas Michot
05b870b484 Use assertFileExists and assertFileNotExists (#75) 2016-05-27 10:36:40 -05:00
Taylor Otwell
14588a40d8 load extensions 2016-05-11 20:32:53 -05:00
Taylor Otwell
e25be02c69 fix tests user call 2016-05-08 23:37:01 -05:00
Taylor Otwell
075443b763 refactor and tests 2016-05-08 23:04:16 -05:00