benjamincrozat's avatar

Problem running integration test on Travis

Hello people,

I'm looking to run integration tests on Travis, but despite running "php artisan serve", http://localhost:8000 isn't accessible.

Here's a part of my .travis.yml file:

before_script:
    # [...]
    - composer update
    - composer run-script post-root-package-install
    - composer run-script post-create-project-cmd
    - mysql -e "create database larastruct"
    - php artisan migrate
    - php artisan serve > /dev/null 2>&1 &

script:
    - phpunit

Here's what PHPUnit tells me:

ArticlesControllerTest::it_create_article
A request to [http://localhost/articles/create] failed. Received status code [404].

The weird part is that the baseUrl in my TestCase is set to `http://localhost:8000'.

If anyone has experience with or even a link to an open source project doing the same thing, I'd be happy!

0 likes
0 replies

Please or to participate in this conversation.