original_string: protected function prepareDirectories()
      {
          $tests = $this->resolveBrowserTestsPath();
  
          foreach (['/screenshots', '/console'] as $dir) {
              if (! is_dir($tests.$dir)) {
                  mkdir($tests.$dir, 0777, true);
              }
          }
  
          Browser::$storeScreenshotsAt = $tests.'/screenshots';
          Browser::$storeConsoleLogAt = $tests.'/console';
      }
code: protected function prepareDirectories()
      {
          $tests = $this->resolveBrowserTestsPath();
  
          foreach (['/screenshots', '/console'] as $dir) {
              if (! is_dir($tests.$dir)) {
                  mkdir($tests.$dir, 0777, true);
              }
          }
  
          Browser::$storeScreenshotsAt = $tests.'/screenshots';
          Browser::$storeConsoleLogAt = $tests.'/console';
      }
code_tokens: protected function prepareDirectories ( ) { $ tests = $ this -> resolveBrowserTestsPath ( ) ; foreach ( [ '/screenshots' , '/console' ] as $ dir ) { if ( ! is_dir ( $ tests . $ dir ) ) { mkdir ( $ tests . $ dir , 0777 , true ) ; } } Browser :: $ storeScreenshotsAt = $ tests . '/screenshots' ; Browser :: $ storeConsoleLogAt = $ tests . '/console' ; }
docstring: Ensure the directories we need for dusk exist, and set them for the Browser to use.
  
  @throws \Exception
  
  @return void
docstring_tokens: Ensure the directories we need for dusk exist and set them for the Browser to use .