File Manager Lite
Dir:
/home/codewavebd/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Testing
Upload
[..]
Attributes/
Rename
Del
CachedState.php (165 B)
Edit
Rename
Del
Concerns/
Rename
Del
DatabaseMigrations.php (1.36 KB)
Edit
Rename
Del
DatabaseTransactions.php (1.61 KB)
Edit
Rename
Del
DatabaseTransactionsManager.php (1.81 KB)
Edit
Rename
Del
DatabaseTruncation.php (6.11 KB)
Edit
Rename
Del
LazilyRefreshDatabase.php (1.28 KB)
Edit
Rename
Del
RefreshDatabase.php (5.19 KB)
Edit
Rename
Del
TestCase.php (3.34 KB)
Edit
Rename
Del
Traits/
Rename
Del
WithCachedConfig.php (1.07 KB)
Edit
Rename
Del
WithCachedRoutes.php (1.38 KB)
Edit
Rename
Del
WithConsoleEvents.php (344 B)
Edit
Rename
Del
WithFaker.php (1.21 KB)
Edit
Rename
Del
WithoutMiddleware.php (500 B)
Edit
Rename
Del
Wormhole.php (7.28 KB)
Edit
Rename
Del
Edit: DatabaseTransactionsManager.php
<?php namespace Illuminate\Foundation\Testing; use Illuminate\Database\DatabaseTransactionsManager as BaseManager; class DatabaseTransactionsManager extends BaseManager { /** * The names of the connections transacting during tests. */ protected array $connectionsTransacting; /** * Create a new database transaction manager instance. * * @param array $connectionsTransacting */ public function __construct(array $connectionsTransacting) { parent::__construct(); $this->connectionsTransacting = $connectionsTransacting; } /** * Register a transaction callback. * * @param callable $callback * @return void */ public function addCallback($callback) { // If there are no transactions, we'll run the callbacks right away. Also, we'll run it // right away when we're in test mode and we only have the wrapping transaction. For // every other case, we'll queue up the callback to run after the commit happens. if ($this->callbackApplicableTransactions()->count() === 0) { return $callback(); } $this->pendingTransactions->last()->addCallback($callback); } /** * Get the transactions that are applicable to callbacks. * * @return \Illuminate\Support\Collection<int, \Illuminate\Database\DatabaseTransactionRecord> */ public function callbackApplicableTransactions() { return $this->pendingTransactions->skip(count($this->connectionsTransacting))->values(); } /** * Determine if after commit callbacks should be executed for the given transaction level. * * @param int $level * @return bool */ public function afterCommitCallbacksShouldBeExecuted($level) { return $level === 1; } }
Simpan