• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

orchestral / testbench-dusk / 13499830633

24 Feb 2025 02:02PM UTC coverage: 90.455%. Remained the same
13499830633

push

github

crynobone
wip

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

199 of 220 relevant lines covered (90.45%)

8.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.24
/src/functions.php
1
<?php
2

3
namespace Orchestra\Testbench\Dusk;
4

5
use Illuminate\Support\Arr;
6
use Illuminate\Support\LazyCollection;
7
use Laravel\Dusk\Browser;
8

9
use function Orchestra\Sidekick\join_paths;
10
use function Orchestra\Testbench\package_path;
11

12
/**
13
 * Get the default skeleton path
14
 *
15
 * @no-named-arguments
16
 *
17
 * @param  array|string  $path
18
 */
19
function default_skeleton_path($path = ''): string
20
{
21
    return (string) realpath(join_paths(__DIR__, '..', 'laravel', ...Arr::wrap(\func_num_args() > 1 ? \func_get_args() : $path)));
21✔
22
}
23

24
/**
25
 * Prepare debug direcotories.
26
 */
27
function prepare_debug_directories(): void
28
{
29
    if (\defined('TESTBENCH_DIRECTORY_STUBBED')) {
23✔
30
        return;
22✔
31
    }
32

33
    $path = package_path(join_paths('tests', 'Browser'));
1✔
34

35
    LazyCollection::make(['screenshots', 'console', 'source'])
1✔
36
        ->map(static fn ($directory) => join_paths($path, $directory))
1✔
37
        ->each(static function ($directory) {
1✔
38
            if (! is_dir($directory)) {
1✔
39
                mkdir($directory, 0777, true);
×
40
            }
41
        })->each(static function ($directory) {
1✔
42
            if (! is_file(join_paths($directory, '.gitignore'))) {
1✔
43
                copy((string) realpath(join_paths(__DIR__, '..', 'stubs', 'gitignore.stub')), join_paths($directory, '.gitignore'));
×
44
            }
45
        });
1✔
46

47
    Browser::$storeScreenshotsAt = join_paths($path, 'screenshots');
1✔
48
    Browser::$storeConsoleLogAt = join_paths($path, 'console');
1✔
49
    Browser::$storeSourceAt = join_paths($path, 'source');
1✔
50

51
    \define('TESTBENCH_DIRECTORY_STUBBED', true);
1✔
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc