0

I followed the instructions here:

http://sangatpedas.com/20140219/installing-laravel-osx-mavericks/

Then installed Behat (making sure to update composer.json with "minimum-stability": "dev"):

https://github.com/laracasts/Behat-Laravel-Extension

composer require behat/behat behat/mink behat/mink-extension laracasts/behat-laravel-extension --dev

I created behat.yml at root level of project:

default:
    extensions:
        Laracasts\Behat:
            # env_path: .env.behat
        Behat\MinkExtension:
            default_session: laravel
            laravel: ~
    paths:
        features: features
        bootstrap: %behat.paths.features%/bootstrap

When I cd to root level of project and run:

vendor/bin/behat -v

I get:

  [RuntimeException]                                        
  Could not locate the path to the Laravel bootstrap file.  



Exception trace:
 () at /Users/zackmorris/Projects/your-project-name/vendor/laracasts/behat-laravel-extension/src/ServiceContainer/LaravelBooter.php:86
 Laracasts\Behat\ServiceContainer\LaravelBooter->assertBootstrapFileExists() at /Users/zackmorris/Projects/your-project-name/vendor/laracasts/behat-laravel-extension/src/ServiceContainer/LaravelBooter.php:66
 Laracasts\Behat\ServiceContainer\LaravelBooter->boot() at /Users/zackmorris/Projects/your-project-name/vendor/laracasts/behat-laravel-extension/src/ServiceContainer/BehatExtension.php:77
 Laracasts\Behat\ServiceContainer\BehatExtension->loadLaravel() at /Users/zackmorris/Projects/your-project-name/vendor/laracasts/behat-laravel-extension/src/ServiceContainer/BehatExtension.php:61
 Laracasts\Behat\ServiceContainer\BehatExtension->load() at /Users/zackmorris/Projects/your-project-name/vendor/behat/behat/src/Behat/Testwork/ServiceContainer/ContainerLoader.php:159
 Behat\Testwork\ServiceContainer\ContainerLoader->loadExtension() at /Users/zackmorris/Projects/your-project-name/vendor/behat/behat/src/Behat/Testwork/ServiceContainer/ContainerLoader.php:130
 Behat\Testwork\ServiceContainer\ContainerLoader->loadExtensions() at /Users/zackmorris/Projects/your-project-name/vendor/behat/behat/src/Behat/Testwork/ServiceContainer/ContainerLoader.php:67
 Behat\Testwork\ServiceContainer\ContainerLoader->load() at /Users/zackmorris/Projects/your-project-name/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php:162
 Behat\Testwork\Cli\Application->createContainer() at /Users/zackmorris/Projects/your-project-name/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php:138
 Behat\Testwork\Cli\Application->createCommand() at /Users/zackmorris/Projects/your-project-name/vendor/behat/behat/src/Behat/Testwork/Cli/Application.php:96
 Behat\Testwork\Cli\Application->doRun() at /Users/zackmorris/Projects/your-project-name/vendor/symfony/console/Symfony/Component/Console/Application.php:124
 Symfony\Component\Console\Application->run() at /Users/zackmorris/Projects/your-project-name/vendor/behat/behat/bin/behat:31

I even tried updating behat.yml for 3:

https://stackoverflow.com/a/25626844

Still no luck. For the life of me I can't find any mention of "could not locate the path to the Laravel bootstrap file" on google.

I think the problem is happening because there is no bootstrap/app.php file but perhaps Behat is trying to use one.

I'm on Mac OS 10.10.1 and php 5.5.14 thanks.

Community
  • 1
  • 1

1 Answers1

2

Try this:

composer update && composer dump-autoload

and

php artisan optimize --force

this command will force the /bootstrap/compiled.php to be generated even if you are in debug mode.

Victor
  • 556
  • 1
  • 10
  • 23