Skip to content

Commit 2da32cd

Browse files
committed
Update fixed
1 parent a7d30f5 commit 2da32cd

File tree

9 files changed

+459
-13
lines changed

9 files changed

+459
-13
lines changed

src/DbFakerMask.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ public function mask()
4343
$fields = [];
4444

4545
$record = (array) $record;
46-
4746
foreach ($tableFields as $field => $fieldConfig) {
4847

4948
if (is_callable($fieldConfig)) {
@@ -54,9 +53,8 @@ public function mask()
5453

5554
$fields[$field] = $value;
5655
}
56+
$this->update($table, $record, $fields);
5757
}
58-
59-
$this->update($table, $record, $fields);
6058
});
6159
}
6260
}

tests/bootstrap/.env.testing

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
APP_ENV=development
2-
APP_DEBUG=true
3-
CONNECTION=mysql
4-
DB_DATABASE=merchant_prod_prod_human
5-
DB_HOST=127.0.0.1
6-
DB_PORT=3310
7-
DB_USERNAME=root
8-
DB_PASSWORD=s3cr3t
1+
DB_CONNECTION=sqlite
2+
DB_DATABASE=database.sqlite

tests/bootstrap/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/bootstrap/app.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?php
2+
3+
/*
4+
|--------------------------------------------------------------------------
5+
| Create The Application
6+
|--------------------------------------------------------------------------
7+
|
8+
| The first thing we will do is create a new Laravel application instance
9+
| which serves as the "glue" for all the components of Laravel, and is
10+
| the IoC container for the system binding all of the various parts.
11+
|
12+
*/
13+
14+
$app = new Illuminate\Foundation\Application(
15+
realpath(__DIR__)
16+
);
17+
18+
/*
19+
|--------------------------------------------------------------------------
20+
| Bind Important Interfaces
21+
|--------------------------------------------------------------------------
22+
|
23+
| Next, we need to bind some important interfaces into the container so
24+
| we will be able to resolve them when needed. The kernels serve the
25+
| incoming requests to this application from both the web and CLI.
26+
|
27+
*/
28+
29+
$app->singleton(
30+
Illuminate\Contracts\Http\Kernel::class,
31+
\Tests\Kernel::class
32+
);
33+
34+
/*
35+
|--------------------------------------------------------------------------
36+
| Return The Application
37+
|--------------------------------------------------------------------------
38+
|
39+
| This script returns the application instance. The instance is given to
40+
| the calling script so we can separate the building of the instances
41+
| from the actual running of the application and sending responses.
42+
|
43+
*/
44+
45+
return $app;

tests/bootstrap/autoload.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
define('LARAVEL_START', microtime(true));
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Register The Composer Auto Loader
8+
|--------------------------------------------------------------------------
9+
|
10+
| Composer provides a convenient, automatically generated class loader
11+
| for our application. We just need to utilize it! We'll require it
12+
| into the script here so we do not have to manually load any of
13+
| our application's PHP classes. It just feels great to relax.
14+
|
15+
*/
16+
17+
require __DIR__.'/../../vendor/autoload.php';

tests/bootstrap/config/app.php

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Application Name
8+
|--------------------------------------------------------------------------
9+
|
10+
| This value is the name of your application. This value is used when the
11+
| framework needs to place the application's name in a notification or
12+
| any other location as required by the application or its packages.
13+
*/
14+
15+
'name' => env('APP_NAME', 'Test'),
16+
17+
/*
18+
|--------------------------------------------------------------------------
19+
| Application Environment
20+
|--------------------------------------------------------------------------
21+
|
22+
| This value determines the "environment" your application is currently
23+
| running in. This may determine how you prefer to configure various
24+
| services your application utilizes. Set this in your ".env" file.
25+
|
26+
*/
27+
28+
'env' => env('APP_ENV', 'testing'),
29+
30+
/*
31+
|--------------------------------------------------------------------------
32+
| Application Debug Mode
33+
|--------------------------------------------------------------------------
34+
|
35+
| When your application is in debug mode, detailed error messages with
36+
| stack traces will be shown on every error that occurs within your
37+
| application. If disabled, a simple generic error page is shown.
38+
|
39+
*/
40+
41+
'debug' => env('APP_DEBUG', false),
42+
43+
/*
44+
|--------------------------------------------------------------------------
45+
| Application URL
46+
|--------------------------------------------------------------------------
47+
|
48+
| This URL is used by the console to properly generate URLs when using
49+
| the Artisan command line tool. You should set this to the root of
50+
| your application so that it is used when running Artisan tasks.
51+
|
52+
*/
53+
54+
'url' => env('APP_URL', 'http://localhost'),
55+
56+
/*
57+
|--------------------------------------------------------------------------
58+
| Application Timezone
59+
|--------------------------------------------------------------------------
60+
|
61+
| Here you may specify the default timezone for your application, which
62+
| will be used by the PHP date and date-time functions. We have gone
63+
| ahead and set this to a sensible default for you out of the box.
64+
|
65+
*/
66+
67+
'timezone' => 'Europe/Berlin',
68+
69+
/*
70+
|--------------------------------------------------------------------------
71+
| Application Locale Configuration
72+
|--------------------------------------------------------------------------
73+
|
74+
| The application locale determines the default locale that will be used
75+
| by the translation service provider. You are free to set this value
76+
| to any of the locales which will be supported by the application.
77+
|
78+
*/
79+
80+
'locale' => 'en',
81+
82+
/*
83+
|--------------------------------------------------------------------------
84+
| Application Fallback Locale
85+
|--------------------------------------------------------------------------
86+
|
87+
| The fallback locale determines the locale to use when the current one
88+
| is not available. You may change the value to correspond to any of
89+
| the language folders that are provided through your application.
90+
|
91+
*/
92+
93+
'fallback_locale' => 'en',
94+
95+
/*
96+
|--------------------------------------------------------------------------
97+
| Encryption Key
98+
|--------------------------------------------------------------------------
99+
|
100+
| This key is used by the Illuminate encrypter service and should be set
101+
| to a random, 32 character string, otherwise these encrypted strings
102+
| will not be safe. Please do this before deploying an application!
103+
|
104+
*/
105+
106+
'key' => env('APP_KEY'),
107+
108+
'cipher' => 'AES-256-CBC',
109+
110+
/*
111+
|--------------------------------------------------------------------------
112+
| Logging Configuration
113+
|--------------------------------------------------------------------------
114+
|
115+
| Here you may configure the log settings for your application. Out of
116+
| the box, Laravel uses the Monolog PHP logging library. This gives
117+
| you a variety of powerful log handlers / formatters to utilize.
118+
|
119+
| Available Settings: "single", "daily", "syslog", "errorlog"
120+
|
121+
*/
122+
123+
'log' => env('APP_LOG', 'single'),
124+
125+
'log_level' => env('APP_LOG_LEVEL', 'debug'),
126+
127+
/*
128+
|--------------------------------------------------------------------------
129+
| Autoloaded Service Providers
130+
|--------------------------------------------------------------------------
131+
|
132+
| The service providers listed here will be automatically loaded on the
133+
| request to your application. Feel free to add your own services to
134+
| this array to grant expanded functionality to your applications.
135+
|
136+
*/
137+
138+
'providers' => [
139+
140+
/*
141+
* Laravel Framework Service Providers...
142+
*/
143+
Illuminate\Cache\CacheServiceProvider::class,
144+
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
145+
Illuminate\Database\DatabaseServiceProvider::class,
146+
Illuminate\Filesystem\FilesystemServiceProvider::class,
147+
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
148+
149+
// Illuminate\View\ViewServiceProvider::class,
150+
151+
],
152+
153+
/*
154+
|--------------------------------------------------------------------------
155+
| Class Aliases
156+
|--------------------------------------------------------------------------
157+
|
158+
| This array of class aliases will be registered when this application
159+
| is started. However, feel free to register as many as you wish as
160+
| the aliases are "lazy" loaded so they don't hinder performance.
161+
|
162+
*/
163+
164+
'aliases' => [
165+
'App' => Illuminate\Support\Facades\App::class,
166+
'Artisan' => Illuminate\Support\Facades\Artisan::class,
167+
'Cache' => Illuminate\Support\Facades\Cache::class,
168+
'Crypt' => Illuminate\Support\Facades\Crypt::class,
169+
'DB' => Illuminate\Support\Facades\DB::class,
170+
//'Eloquent' => Illuminate\Database\Eloquent\Model::class,
171+
'File' => Illuminate\Support\Facades\File::class,
172+
'Gate' => Illuminate\Support\Facades\Gate::class,
173+
'Hash' => Illuminate\Support\Facades\Hash::class,
174+
'Log' => Illuminate\Support\Facades\Log::class,
175+
],
176+
177+
];

tests/bootstrap/config/cache.php

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?php
2+
3+
return [
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Default Cache Store
8+
|--------------------------------------------------------------------------
9+
|
10+
| This option controls the default cache connection that gets used while
11+
| using this caching library. This connection is used when another is
12+
| not explicitly specified when executing a given caching function.
13+
|
14+
| Supported: "apc", "array", "database", "file", "memcached", "redis"
15+
|
16+
*/
17+
18+
'default' => env('CACHE_DRIVER', 'file'),
19+
20+
/*
21+
|--------------------------------------------------------------------------
22+
| Cache Stores
23+
|--------------------------------------------------------------------------
24+
|
25+
| Here you may define all of the cache "stores" for your application as
26+
| well as their drivers. You may even define multiple stores for the
27+
| same cache driver to group types of items stored in your caches.
28+
|
29+
*/
30+
31+
'stores' => [
32+
33+
'apc' => [
34+
'driver' => 'apc',
35+
],
36+
37+
'array' => [
38+
'driver' => 'array',
39+
],
40+
41+
'database' => [
42+
'driver' => 'database',
43+
'table' => 'cache',
44+
'connection' => null,
45+
],
46+
47+
'file' => [
48+
'driver' => 'file',
49+
'path' => storage_path('framework/cache/data'),
50+
],
51+
52+
'memcached' => [
53+
'driver' => 'memcached',
54+
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
55+
'sasl' => [
56+
env('MEMCACHED_USERNAME'),
57+
env('MEMCACHED_PASSWORD'),
58+
],
59+
'options' => [
60+
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
61+
],
62+
'servers' => [
63+
[
64+
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
65+
'port' => env('MEMCACHED_PORT', 11211),
66+
'weight' => 100,
67+
],
68+
],
69+
],
70+
71+
'redis' => [
72+
'driver' => 'redis',
73+
'connection' => 'default',
74+
],
75+
76+
],
77+
78+
/*
79+
|--------------------------------------------------------------------------
80+
| Cache Key Prefix
81+
|--------------------------------------------------------------------------
82+
|
83+
| When utilizing a RAM based store such as APC or Memcached, there might
84+
| be other applications utilizing the same cache. So, we'll specify a
85+
| value to get prefixed to all our keys so we can avoid collisions.
86+
|
87+
*/
88+
89+
'prefix' => 'laravel',
90+
91+
];

0 commit comments

Comments
 (0)