diff options
Diffstat (limited to 'vendor/illuminate')
| -rwxr-xr-x | vendor/illuminate/database/DatabaseServiceProvider.php | 4 | ||||
| -rw-r--r-- | vendor/illuminate/support/Facades/Bus.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Event.php | 4 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Facade.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Mail.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Queue.php | 6 | ||||
| -rwxr-xr-x | vendor/illuminate/support/Facades/Schema.php | 6 | ||||
| -rw-r--r-- | vendor/illuminate/support/Facades/Storage.php | 12 | ||||
| -rwxr-xr-x | vendor/illuminate/support/helpers.php | 4 |
9 files changed, 35 insertions, 19 deletions
diff --git a/vendor/illuminate/database/DatabaseServiceProvider.php b/vendor/illuminate/database/DatabaseServiceProvider.php index 66dd4b9a39..a8ee7b030b 100755 --- a/vendor/illuminate/database/DatabaseServiceProvider.php +++ b/vendor/illuminate/database/DatabaseServiceProvider.php @@ -65,10 +65,6 @@ class DatabaseServiceProvider extends ServiceProvider $this->app->bind('db.connection', function ($app) { return $app['db']->connection(); }); - - $this->app->bind('db.schema', function ($app) { - return $app['db']->connection()->getSchemaBuilder(); - }); } /** diff --git a/vendor/illuminate/support/Facades/Bus.php b/vendor/illuminate/support/Facades/Bus.php index 9bbd4901ee..611358afff 100644 --- a/vendor/illuminate/support/Facades/Bus.php +++ b/vendor/illuminate/support/Facades/Bus.php @@ -20,11 +20,13 @@ class Bus extends Facade /** * Replace the bound instance with a fake. * - * @return void + * @return \Illuminate\Support\Testing\Fakes\BusFake */ public static function fake() { - static::swap(new BusFake); + static::swap($fake = new BusFake); + + return $fake; } /** diff --git a/vendor/illuminate/support/Facades/Event.php b/vendor/illuminate/support/Facades/Event.php index aefc49bb79..73b65981cf 100755 --- a/vendor/illuminate/support/Facades/Event.php +++ b/vendor/illuminate/support/Facades/Event.php @@ -24,13 +24,15 @@ class Event extends Facade * Replace the bound instance with a fake. * * @param array|string $eventsToFake - * @return void + * @return \Illuminate\Support\Testing\Fakes\EventFake */ public static function fake($eventsToFake = []) { static::swap($fake = new EventFake(static::getFacadeRoot(), $eventsToFake)); Model::setEventDispatcher($fake); + + return $fake; } /** diff --git a/vendor/illuminate/support/Facades/Facade.php b/vendor/illuminate/support/Facades/Facade.php index 2a335fd4b7..97286b9b0f 100755 --- a/vendor/illuminate/support/Facades/Facade.php +++ b/vendor/illuminate/support/Facades/Facade.php @@ -159,11 +159,15 @@ abstract class Facade /** * Resolve the facade root instance from the container. * - * @param string $name + * @param object|string $name * @return mixed */ protected static function resolveFacadeInstance($name) { + if (is_object($name)) { + return $name; + } + if (isset(static::$resolvedInstance[$name])) { return static::$resolvedInstance[$name]; } diff --git a/vendor/illuminate/support/Facades/Mail.php b/vendor/illuminate/support/Facades/Mail.php index bee470c7f8..00fc76f730 100755 --- a/vendor/illuminate/support/Facades/Mail.php +++ b/vendor/illuminate/support/Facades/Mail.php @@ -31,11 +31,13 @@ class Mail extends Facade /** * Replace the bound instance with a fake. * - * @return void + * @return \Illuminate\Support\Testing\Fakes\MailFake */ public static function fake() { - static::swap(new MailFake); + static::swap($fake = new MailFake); + + return $fake; } /** diff --git a/vendor/illuminate/support/Facades/Queue.php b/vendor/illuminate/support/Facades/Queue.php index 1f57ba0fec..521d2eb214 100755 --- a/vendor/illuminate/support/Facades/Queue.php +++ b/vendor/illuminate/support/Facades/Queue.php @@ -24,11 +24,13 @@ class Queue extends Facade /** * Replace the bound instance with a fake. * - * @return void + * @return \Illuminate\Support\Testing\Fakes\QueueFake */ public static function fake() { - static::swap(new QueueFake(static::getFacadeApplication())); + static::swap($fake = new QueueFake(static::getFacadeApplication())); + + return $fake; } /** diff --git a/vendor/illuminate/support/Facades/Schema.php b/vendor/illuminate/support/Facades/Schema.php index d3a924811b..31748e1502 100755 --- a/vendor/illuminate/support/Facades/Schema.php +++ b/vendor/illuminate/support/Facades/Schema.php @@ -25,12 +25,12 @@ class Schema extends Facade } /** - * Get the registered name of the component. + * Get a schema builder instance for the default connection. * - * @return string + * @return \Illuminate\Database\Schema\Builder */ protected static function getFacadeAccessor() { - return 'db.schema'; + return static::$app['db']->connection()->getSchemaBuilder(); } } diff --git a/vendor/illuminate/support/Facades/Storage.php b/vendor/illuminate/support/Facades/Storage.php index 5bcbfd6546..97426a1004 100644 --- a/vendor/illuminate/support/Facades/Storage.php +++ b/vendor/illuminate/support/Facades/Storage.php @@ -16,7 +16,7 @@ class Storage extends Facade * * @param string|null $disk * - * @return void + * @return \Illuminate\Filesystem\Filesystem */ public static function fake($disk = null) { @@ -26,22 +26,26 @@ class Storage extends Facade $root = storage_path('framework/testing/disks/'.$disk) ); - static::set($disk, self::createLocalDriver(['root' => $root])); + static::set($disk, $fake = self::createLocalDriver(['root' => $root])); + + return $fake; } /** * Replace the given disk with a persistent local testing disk. * * @param string|null $disk - * @return void + * @return \Illuminate\Filesystem\Filesystem */ public static function persistentFake($disk = null) { $disk = $disk ?: self::$app['config']->get('filesystems.default'); - static::set($disk, self::createLocalDriver([ + static::set($disk, $fake = self::createLocalDriver([ 'root' => storage_path('framework/testing/disks/'.$disk), ])); + + return $fake; } /** diff --git a/vendor/illuminate/support/helpers.php b/vendor/illuminate/support/helpers.php index 0741c4d202..41eb7c486b 100755 --- a/vendor/illuminate/support/helpers.php +++ b/vendor/illuminate/support/helpers.php @@ -662,6 +662,10 @@ if (! function_exists('env')) { return; } + if (preg_match('/([\'"])(.*)\1/', $value, $matches)) { + return $matches[2]; + } + return $value; }) ->getOrCall(function () use ($default) { |
