Closed masterpowers closed 8 years ago
Hi @masterpowers
Sure thing.
From this error log fragment: '.\vendor\bin\phpunit' is not recognized as an internal or external command, operable program or batch file.
it seems that you don't have local phpunit installed..
Are you running composer install --no-dev
?
Also please paste in your composer.json
this is my composer.json file
{
"name": "jadjoubran/laravel5-angular-material-starter",
"description": "Laravel 5 angular material starter project with elixir setup",
"keywords": ["laravel", "angular", "material", "starter", "ui-router", "api"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"barryvdh/laravel-debugbar": "~2.0",
"tymon/jwt-auth": "0.5.*",
"dingo/api": "1.0.x@dev"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php -r \"copy('.env.example', '.env');\"",
"php -r \"unlink('code_of_conduct.md');\"",
"php -r \"unlink('CHANGELOG.md');\"",
"php -r \"unlink('.codeclimate.yml');\"",
"php -r \"unlink('.travis.yml');\"",
"php artisan key:generate",
"php artisan jwt:generate"
]
}
}
im not running composer install --no dev im just using the normal composer install
i try to run php unit and got this Ok , but for Gulp still failing
C:\Users\Andrew Galang\Code\rfnbeta>phpunit
PHPUnit 4.8.10 by Sebastian Bergmann and contributors.
......
Time: 5.63 seconds, Memory: 15.75Mb
OK (6 tests, 17 assertions)
Maybe you can the fix described here
If it doesn't work, try installing php unit globally:
composer global require "phpunit/phpunit=4.0.*"
I just saw your comment.
So it means the first suggestion should fix it - npm cache clear
and then npm install
still got the same results it failed
this is what is inside gulpfile.js
elixir(function(mix){
mix
.bower()
.angular('./angular/')
.less('./angular/**/*.less', 'public/css')
.copy('./angular/app/**/*.html', 'public/views/app/')
.copy('./angular/directives/**/*.html', 'public/views/directives/')
.copy('./angular/dialogs/**/*.html', 'public/views/dialogs/')
.livereload([
'public/js/vendor.js',
'public/js/app.js',
'public/css/vendor.css',
'public/css/app.css',
'public/views/**/*.html'
], {liveCSS: true})
.phpUnit();
});
if i remove phpUnit(); is doesnt throw error, but with it when u test it failed dont know why
Please check if this stackoverflow fixes it.
This is not a problem with this package. If you run a few installation for Laravel and add .phpUnit()
to your gulpfile you're going to see the same error.
Please update this thread if you were able to solve it Thanks!
what's the solution?I same issue.
@mzvast make sure you did the following:
.env
file (also make sure you have a test database)php artisan migrate
then if you run the tests it should work
Hi i got a fresh new install of your repo why is your test failing? Sorry but i need to know why