Support the ongoing development of Laravel.io →
Configuration Packages Testing
Last updated 2 years ago.
0

I am going to assume, that you did not run the dump-autoload command, since you did not mentioned it. In case you do not know what this command does, click here to find out

Last updated 8 years ago.
0

SzkolaWEB said:

I am going to assume, that you did not run the dump-autoload command, since you did not mentioned it. In case you do not know what this command does, click here to find out

ok done i run :

C:\serverapache\htdocs\packtest>composer dumpautoload
Generating autoload files

tried run again a phpunit:

C:\server\packtest\vendor\dvdoug\boxpacker\tests>phpunit PackerTest
.php

Fatal error: Class 'DVDoug\BoxPacker\TestBox' not found in C:\server\packtest\vendor\dvdoug\boxpacker\tests\PackerTest.php on line 517

I think running phpunit should work directly ...

edit: I made a fresh laravel 5.2 installation and run commands like you suggested soon after:

C:\server\packtest>composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing dvdoug/boxpacker (1.5.2)
    Loading from cache

Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader

C:\server\packtest>composer dump-autoload
Generating autoload files

C:\server\packtest>

running php unit on tests folders in vendor still same error... Am I wrong on running phpunit maybe? anyway if i create a controller in my app folder and use thepackage i got same error...

Last updated 8 years ago.
0

addendum:

https://github.com/dvdoug/BoxPacker/issues/38

said they resolved adding: " I have got everything to work by adding one more include: require_once $_SERVER['DOCUMENT_ROOT'] . '/../composer/vendor/dvdoug/boxpacker/tests/bootstrap.php'; "

the bootstrap contains basic implementation for packer, box, item ect ect ...

if i want to follow this solution how this "translate" into laravel system? thank guys

0

Sign in to participate in this thread!

Eventy

Your banner here too?

alko79 alko79 Joined 12 Jul 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.