mirror of
https://github.com/laravel/valet.git
synced 2026-02-08 01:10:08 +01:00
Fix code styling
This commit is contained in:
committed by
github-actions[bot]
parent
5b28d4bd0f
commit
fc1b23b523
@@ -15,7 +15,7 @@ public function currentTunnelUrl(?string $domain = null): ?string
|
||||
|
||||
try {
|
||||
$response = retry(20, function () use ($endpoint, $domain) {
|
||||
$body = json_decode((new Client())->get($endpoint)->getBody());
|
||||
$body = json_decode((new Client)->get($endpoint)->getBody());
|
||||
|
||||
if (isset($body->tunnels) && count($body->tunnels) > 0) {
|
||||
if ($tunnelUrl = $this->findHttpTunnelUrl($body->tunnels, $domain)) {
|
||||
|
||||
@@ -26,7 +26,7 @@ public function currentTunnelUrl(?string $domain = null): string
|
||||
foreach ($this->tunnelsEndpoints as $endpoint) {
|
||||
try {
|
||||
$response = retry(20, function () use ($endpoint, $domain) {
|
||||
$body = json_decode((new Client())->get($endpoint)->getBody());
|
||||
$body = json_decode((new Client)->get($endpoint)->getBody());
|
||||
|
||||
if (isset($body->tunnels) && count($body->tunnels) > 0) {
|
||||
if ($tunnelUrl = $this->findHttpTunnelUrl($body->tunnels, $domain)) {
|
||||
|
||||
@@ -478,7 +478,7 @@ public function secure(string $url, ?string $siteConf = null, int $certificateEx
|
||||
// Create the CA if it doesn't exist.
|
||||
// If the user cancels the trust operation, the old certificate will not be removed.
|
||||
$this->files->ensureDirExists($this->caPath(), user());
|
||||
$caExpireInDate = (new \DateTime())->diff(new \DateTime("+{$caExpireInYears} years"));
|
||||
$caExpireInDate = (new \DateTime)->diff(new \DateTime("+{$caExpireInYears} years"));
|
||||
$this->createCa($caExpireInDate->format('%a'));
|
||||
|
||||
$this->unsecure($url);
|
||||
|
||||
@@ -36,7 +36,7 @@ public function unlinkFromUsersBin(): void
|
||||
public function onLatestVersion(string $currentVersion): bool
|
||||
{
|
||||
$url = 'https://api.github.com/repos/laravel/valet/releases/latest';
|
||||
$response = json_decode((new Client())->get($url)->getBody());
|
||||
$response = json_decode((new Client)->get($url)->getBody());
|
||||
|
||||
return version_compare($currentVersion, trim($response->tag_name, 'v'), '>=');
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
$app = new Application('Laravel Valet', $version);
|
||||
|
||||
$app->setDispatcher($dispatcher = new EventDispatcher());
|
||||
$app->setDispatcher($dispatcher = new EventDispatcher);
|
||||
|
||||
$dispatcher->addListener(
|
||||
ConsoleEvents::COMMAND,
|
||||
@@ -280,7 +280,7 @@ function (ConsoleCommandEvent $event) {
|
||||
* Display all of the currently secured sites.
|
||||
*/
|
||||
$app->command('secured [--expiring] [--days=]', function (OutputInterface $output, $expiring = null, $days = 60) {
|
||||
$now = (new Datetime())->add(new DateInterval('P'.$days.'D'));
|
||||
$now = (new Datetime)->add(new DateInterval('P'.$days.'D'));
|
||||
$sites = collect(Site::securedWithDates())
|
||||
->when($expiring, fn ($collection) => $collection->filter(fn ($row) => $row['exp'] < $now))
|
||||
->map(function ($row) {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
define('VALET_LOOPBACK', '127.0.0.1');
|
||||
define('VALET_SERVER_PATH', realpath(__DIR__.'/../../server.php'));
|
||||
|
||||
define('BREW_PREFIX', (new CommandLine())->runAsUser('printf $(brew --prefix)'));
|
||||
define('BREW_PREFIX', (new CommandLine)->runAsUser('printf $(brew --prefix)'));
|
||||
|
||||
define('ISOLATED_PHP_VERSION', 'ISOLATED_PHP_VERSION');
|
||||
|
||||
@@ -38,7 +38,7 @@ function writer(?OutputInterface $writer = null): OutputInterface|\NullWriter|nu
|
||||
|
||||
if (! $writer) {
|
||||
if (! $container->bound('writer')) {
|
||||
$container->instance('writer', new ConsoleOutput());
|
||||
$container->instance('writer', new ConsoleOutput);
|
||||
}
|
||||
|
||||
return $container->make('writer');
|
||||
|
||||
@@ -6,7 +6,7 @@ class BasicValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_anything()
|
||||
{
|
||||
$driver = new BasicValetDriver();
|
||||
$driver = new BasicValetDriver;
|
||||
|
||||
foreach ($this->projects() as $projectDir) {
|
||||
$this->assertTrue($driver->serves($projectDir, 'my-site', '/'));
|
||||
@@ -16,7 +16,7 @@ public function test_it_serves_anything()
|
||||
public function test_it_serves_php_files_from_root()
|
||||
{
|
||||
$projectPath = $this->projectDir('basic-no-public');
|
||||
$driver = new BasicValetDriver();
|
||||
$driver = new BasicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/file-in-root.php',
|
||||
@@ -27,7 +27,7 @@ public function test_it_serves_php_files_from_root()
|
||||
public function test_it_serves_directory_with_index_php()
|
||||
{
|
||||
$projectPath = $this->projectDir('basic-no-public');
|
||||
$driver = new BasicValetDriver();
|
||||
$driver = new BasicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/about/index.php',
|
||||
@@ -38,7 +38,7 @@ public function test_it_serves_directory_with_index_php()
|
||||
public function test_it_routes_to_index_if_404()
|
||||
{
|
||||
$projectPath = $this->projectDir('basic-no-public');
|
||||
$driver = new BasicValetDriver();
|
||||
$driver = new BasicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/index.php',
|
||||
@@ -49,7 +49,7 @@ public function test_it_routes_to_index_if_404()
|
||||
public function test_it_serves_directory_with_index_html()
|
||||
{
|
||||
$projectPath = $this->projectDir('basic-no-public');
|
||||
$driver = new BasicValetDriver();
|
||||
$driver = new BasicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/team/index.html',
|
||||
@@ -60,7 +60,7 @@ public function test_it_serves_directory_with_index_html()
|
||||
public function test_it_serves_static_files()
|
||||
{
|
||||
$projectPath = $this->projectDir('basic-no-public');
|
||||
$driver = new BasicValetDriver();
|
||||
$driver = new BasicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/assets/document.txt',
|
||||
|
||||
@@ -6,14 +6,14 @@ class BasicWithPublicValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_anything_with_public()
|
||||
{
|
||||
$driver = new BasicWithPublicValetDriver();
|
||||
$driver = new BasicWithPublicValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_from_not_public()
|
||||
{
|
||||
$driver = new BasicWithPublicValetDriver();
|
||||
$driver = new BasicWithPublicValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('basic-no-public'), 'my-site', '/'));
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public function test_it_doesnt_serve_from_not_public()
|
||||
public function test_it_serves_php_files_from_public()
|
||||
{
|
||||
$projectPath = $this->projectDir('public-with-index-non-laravel');
|
||||
$driver = new BasicWithPublicValetDriver();
|
||||
$driver = new BasicWithPublicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/public/file-in-public.php',
|
||||
@@ -32,7 +32,7 @@ public function test_it_serves_php_files_from_public()
|
||||
public function test_it_doesnt_serve_php_files_from_root()
|
||||
{
|
||||
$projectPath = $this->projectDir('public-with-index-non-laravel');
|
||||
$driver = new BasicWithPublicValetDriver();
|
||||
$driver = new BasicWithPublicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/public/index.php',
|
||||
@@ -43,7 +43,7 @@ public function test_it_doesnt_serve_php_files_from_root()
|
||||
public function test_it_serves_directory_with_index_php()
|
||||
{
|
||||
$projectPath = $this->projectDir('public-with-index-non-laravel');
|
||||
$driver = new BasicWithPublicValetDriver();
|
||||
$driver = new BasicWithPublicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/public/about/index.php',
|
||||
@@ -54,7 +54,7 @@ public function test_it_serves_directory_with_index_php()
|
||||
public function test_it_route_to_public_index_if_404()
|
||||
{
|
||||
$projectPath = $this->projectDir('public-with-index-non-laravel');
|
||||
$driver = new BasicWithPublicValetDriver();
|
||||
$driver = new BasicWithPublicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/public/index.php',
|
||||
@@ -65,7 +65,7 @@ public function test_it_route_to_public_index_if_404()
|
||||
public function test_it_serves_directory_with_index_html()
|
||||
{
|
||||
$projectPath = $this->projectDir('public-with-index-non-laravel');
|
||||
$driver = new BasicWithPublicValetDriver();
|
||||
$driver = new BasicWithPublicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/public/team/index.html',
|
||||
@@ -76,7 +76,7 @@ public function test_it_serves_directory_with_index_html()
|
||||
public function test_it_serves_static_files()
|
||||
{
|
||||
$projectPath = $this->projectDir('public-with-index-non-laravel');
|
||||
$driver = new BasicWithPublicValetDriver();
|
||||
$driver = new BasicWithPublicValetDriver;
|
||||
|
||||
$this->assertEquals(
|
||||
$projectPath.'/public/assets/document.txt',
|
||||
|
||||
@@ -6,21 +6,21 @@ class BedrockValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_bedrock_projects()
|
||||
{
|
||||
$driver = new BedrockValetDriver();
|
||||
$driver = new BedrockValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('bedrock'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_bedrock_projects()
|
||||
{
|
||||
$driver = new BedrockValetDriver();
|
||||
$driver = new BedrockValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new BedrockValetDriver();
|
||||
$driver = new BedrockValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('bedrock');
|
||||
$this->assertEquals($projectPath.'/web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class CakeValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_cake_projects()
|
||||
{
|
||||
$driver = new CakeValetDriver();
|
||||
$driver = new CakeValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('cake'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_cake_projects()
|
||||
{
|
||||
$driver = new CakeValetDriver();
|
||||
$driver = new CakeValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new CakeValetDriver();
|
||||
$driver = new CakeValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('cake');
|
||||
$this->assertEquals($projectPath.'/webroot/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class Concrete5ValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_concrete5_projects()
|
||||
{
|
||||
$driver = new Concrete5ValetDriver();
|
||||
$driver = new Concrete5ValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('concrete5'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_concrete5_projects()
|
||||
{
|
||||
$driver = new Concrete5ValetDriver();
|
||||
$driver = new Concrete5ValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new Concrete5ValetDriver();
|
||||
$driver = new Concrete5ValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('concrete5');
|
||||
$this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class ContaoValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_contao_projects()
|
||||
{
|
||||
$driver = new ContaoValetDriver();
|
||||
$driver = new ContaoValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('contao'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_contao_projects()
|
||||
{
|
||||
$driver = new ContaoValetDriver();
|
||||
$driver = new ContaoValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new ContaoValetDriver();
|
||||
$driver = new ContaoValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('contao');
|
||||
$this->assertEquals($projectPath.'/web/app.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class CraftValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_craft_projects()
|
||||
{
|
||||
$driver = new CraftValetDriver();
|
||||
$driver = new CraftValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('craft'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_craft_projects()
|
||||
{
|
||||
$driver = new CraftValetDriver();
|
||||
$driver = new CraftValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new CraftValetDriver();
|
||||
$driver = new CraftValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('craft');
|
||||
$this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class DrupalValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_drupal_projects()
|
||||
{
|
||||
$driver = new DrupalValetDriver();
|
||||
$driver = new DrupalValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('drupal'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_drupal_projects()
|
||||
{
|
||||
$driver = new DrupalValetDriver();
|
||||
$driver = new DrupalValetDriver;
|
||||
|
||||
$this->assertFalse((bool) $driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new DrupalValetDriver();
|
||||
$driver = new DrupalValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('drupal');
|
||||
$this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class JigsawValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_jigsaw_projects()
|
||||
{
|
||||
$driver = new JigsawValetDriver();
|
||||
$driver = new JigsawValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('jigsaw'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_jigsaw_projects_with_public_directory()
|
||||
{
|
||||
$driver = new JigsawValetDriver();
|
||||
$driver = new JigsawValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_mutates_uri()
|
||||
{
|
||||
$driver = new JigsawValetDriver();
|
||||
$driver = new JigsawValetDriver;
|
||||
|
||||
$this->assertEquals('/build_local/about', $driver->mutateUri('/about'));
|
||||
}
|
||||
|
||||
@@ -6,21 +6,21 @@ class JoomlaValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_joomla_projects()
|
||||
{
|
||||
$driver = new JoomlaValetDriver();
|
||||
$driver = new JoomlaValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('joomla'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_joomla_projects_with_public_directory()
|
||||
{
|
||||
$driver = new JoomlaValetDriver();
|
||||
$driver = new JoomlaValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new JoomlaValetDriver();
|
||||
$driver = new JoomlaValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('joomla');
|
||||
$this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class KatanaValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_katana_projects()
|
||||
{
|
||||
$driver = new KatanaValetDriver();
|
||||
$driver = new KatanaValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('katana'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_katana_projects_with_public_directory()
|
||||
{
|
||||
$driver = new KatanaValetDriver();
|
||||
$driver = new KatanaValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_mutates_uri()
|
||||
{
|
||||
$driver = new KatanaValetDriver();
|
||||
$driver = new KatanaValetDriver;
|
||||
|
||||
$this->assertEquals('/public/about', $driver->mutateUri('/about'));
|
||||
}
|
||||
|
||||
@@ -6,21 +6,21 @@ class KirbyValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_kirby_projects()
|
||||
{
|
||||
$driver = new KirbyValetDriver();
|
||||
$driver = new KirbyValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('kirby'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_kirby_projects_with_public_directory()
|
||||
{
|
||||
$driver = new KirbyValetDriver();
|
||||
$driver = new KirbyValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new KirbyValetDriver();
|
||||
$driver = new KirbyValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('kirby');
|
||||
$this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class LaravelValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_laravel_projects()
|
||||
{
|
||||
$driver = new LaravelValetDriver();
|
||||
$driver = new LaravelValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_laravel_projects_with_public_directory()
|
||||
{
|
||||
$driver = new LaravelValetDriver();
|
||||
$driver = new LaravelValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new LaravelValetDriver();
|
||||
$driver = new LaravelValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('laravel');
|
||||
$this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class Magento2ValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_magento2_projects()
|
||||
{
|
||||
$driver = new Magento2ValetDriver();
|
||||
$driver = new Magento2ValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('magento2'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_magento2_projects_with_public_directory()
|
||||
{
|
||||
$driver = new Magento2ValetDriver();
|
||||
$driver = new Magento2ValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new Magento2ValetDriver();
|
||||
$driver = new Magento2ValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('magento2');
|
||||
$this->assertEquals($projectPath.'/pub/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class NeosValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_neos_projects()
|
||||
{
|
||||
$driver = new NeosValetDriver();
|
||||
$driver = new NeosValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('neos'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_neos_projects_with_public_directory()
|
||||
{
|
||||
$driver = new NeosValetDriver();
|
||||
$driver = new NeosValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new NeosValetDriver();
|
||||
$driver = new NeosValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('neos');
|
||||
$this->assertEquals($projectPath.'/Web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class SculpinValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_sculpin_projects()
|
||||
{
|
||||
$driver = new SculpinValetDriver();
|
||||
$driver = new SculpinValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('sculpin'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_sculpin_projects_with_public_directory()
|
||||
{
|
||||
$driver = new SculpinValetDriver();
|
||||
$driver = new SculpinValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_mutates_uri()
|
||||
{
|
||||
$driver = new SculpinValetDriver();
|
||||
$driver = new SculpinValetDriver;
|
||||
|
||||
$this->assertEquals('/output_dev/about', $driver->mutateUri('/about'));
|
||||
}
|
||||
|
||||
@@ -6,21 +6,21 @@ class StatamicV1ValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_statamicv1_projects()
|
||||
{
|
||||
$driver = new StatamicV1ValetDriver();
|
||||
$driver = new StatamicV1ValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('statamicv1'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_statamicv1_projects()
|
||||
{
|
||||
$driver = new StatamicV1ValetDriver();
|
||||
$driver = new StatamicV1ValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new StatamicV1ValetDriver();
|
||||
$driver = new StatamicV1ValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('statamicv1');
|
||||
$this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class StatamicV2ValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_statamic_projects()
|
||||
{
|
||||
$driver = new StatamicV2ValetDriver();
|
||||
$driver = new StatamicV2ValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('statamicv2'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_statamic_projects()
|
||||
{
|
||||
$driver = new StatamicV2ValetDriver();
|
||||
$driver = new StatamicV2ValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new StatamicV2ValetDriver();
|
||||
$driver = new StatamicV2ValetDriver;
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'GET';
|
||||
$_SERVER['REQUEST_URI'] = '/about/';
|
||||
|
||||
@@ -6,28 +6,28 @@ class StatamicValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_statamic_projects()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
$driver = new StatamicValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('statamic'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_statamic_projects_with_public_directory()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
$driver = new StatamicValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_laravel_projects()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
$driver = new StatamicValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
$driver = new StatamicValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('statamic');
|
||||
$this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
@@ -35,7 +35,7 @@ public function test_it_gets_front_controller()
|
||||
|
||||
public function test_it_serves_statically_cached_pages()
|
||||
{
|
||||
$driver = new StatamicValetDriver();
|
||||
$driver = new StatamicValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('statamic');
|
||||
|
||||
|
||||
@@ -6,21 +6,21 @@ class SymfonyValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_symfony_projects()
|
||||
{
|
||||
$driver = new SymfonyValetDriver();
|
||||
$driver = new SymfonyValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('symfony'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_symfony_projects()
|
||||
{
|
||||
$driver = new SymfonyValetDriver();
|
||||
$driver = new SymfonyValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new SymfonyValetDriver();
|
||||
$driver = new SymfonyValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('symfony');
|
||||
$this->assertEquals($projectPath.'/web/app.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class Typo3ValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_typo3_projects()
|
||||
{
|
||||
$driver = new Typo3ValetDriver();
|
||||
$driver = new Typo3ValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('typo3'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_typo3_projects()
|
||||
{
|
||||
$driver = new Typo3ValetDriver();
|
||||
$driver = new Typo3ValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new Typo3ValetDriver();
|
||||
$driver = new Typo3ValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('typo3');
|
||||
$this->assertEquals($projectPath.'/web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
@@ -6,21 +6,21 @@ class WordPressValetDriverTest extends BaseDriverTestCase
|
||||
{
|
||||
public function test_it_serves_wordpress_projects()
|
||||
{
|
||||
$driver = new WordPressValetDriver();
|
||||
$driver = new WordPressValetDriver;
|
||||
|
||||
$this->assertTrue($driver->serves($this->projectDir('wordpress'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_doesnt_serve_non_wordpress_projects()
|
||||
{
|
||||
$driver = new WordPressValetDriver();
|
||||
$driver = new WordPressValetDriver;
|
||||
|
||||
$this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/'));
|
||||
}
|
||||
|
||||
public function test_it_gets_front_controller()
|
||||
{
|
||||
$driver = new WordPressValetDriver();
|
||||
$driver = new WordPressValetDriver;
|
||||
|
||||
$projectPath = $this->projectDir('wordpress');
|
||||
$this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));
|
||||
|
||||
Reference in New Issue
Block a user