File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 210210 info ('The [ ' .$ url .'] site will now serve traffic over HTTP. ' );
211211 })->descriptions ('Stop serving the given domain over HTTPS and remove the trusted TLS certificate ' );
212212
213+ /**
214+ * Get all the current secured sites.
215+ */
216+ $ app ->command ('secured ' , function () {
217+ $ sites = collect (Site::secured ())->map (function ($ url ) {
218+ return ['Site ' => $ url ];
219+ });
220+
221+ table (['Site ' ], $ sites ->all ());
222+ });
223+
213224 /**
214225 * Create an Nginx proxy config for the specified domain.
215226 */
Original file line number Diff line number Diff line change @@ -526,6 +526,21 @@ public function test_remove_proxy()
526526
527527 $ this ->assertEquals ([], $ site ->proxies ()->all ());
528528 }
529+
530+ public function test_it_returns_secured_sites ()
531+ {
532+ $ files = Mockery::mock (Filesystem::class);
533+ $ files ->shouldReceive ('scandir ' )
534+ ->once ()
535+ ->andReturn (['helloworld.tld.crt ' ]);
536+
537+ swap (Filesystem::class, $ files );
538+
539+ $ site = resolve (Site::class);
540+ $ sites = $ site ->secured ();
541+
542+ $ this ->assertSame (['helloworld.tld ' ], $ sites );
543+ }
529544}
530545
531546class CommandLineFake extends CommandLine
You can’t perform that action at this time.
0 commit comments