sebastienheyd / boilerplate

Laravel AdminLTE 3 Boilerplate package with blade components, users, roles and permissions management
MIT License
217 stars 65 forks source link

Not able to run tests #78

Closed cod3rshotout closed 1 year ago

cod3rshotout commented 2 years ago

I'm having some difficult to run the tests using phpunit and orchestra/test bench, in the package folder I wrote that command:

./vendor/bin/phpunit

I get 79 errors with this result:

ErrorException: require(/usr/src/app/packages/myapp/boilerplate/vendor/orchestra/testbench-core/laravel/routes/channels.php): Failed to open stream: No such file or directory

sebastienheyd commented 2 years ago

You have to install the components by running composer install in the package folder before running the tests.

You can also call make test instead of ./vendor/bin/phpunit

cod3rshotout commented 2 years ago

@sebastienheyd I already have the component installed ... and I tried also with make test, the error is always the same:

/boilerplate/tests/Artisan/../../testbench/routes/channels.php): Failed to open stream: No such file or directory

I also sent you a private email

sebastienheyd commented 2 years ago

You are in the boilerplate package folder ?

cod3rshotout commented 2 years ago

@sebastienheyd yes, I have this directory structure:

    /laravel
      /src
        /packages
          /sebastienheyd
            /boilerplate

I'm trying to execute the command "make test" within the "boilerplate" directory, and I get the error above:

/boilerplate/tests/Artisan/../../testbench/routes/channels.php): Failed to open stream: No such file or directory

If I browse within the vendor package "testbench", in particular to this path:

vendor/orchestra/testbench-core/laravel/routes

There is no "channels.php", so I guess this file must be copied from the boilerplate routes folder or I don't know how is possible to run the tests

sebastienheyd commented 1 year ago

I just pushed a complete refactoring of the tests, can you try with the dev-master branch?