php vendor \ bin \ phpunit在控制台中打印文本 [英] php vendor\bin\phpunit is printing in console a text

查看:204
本文介绍了php vendor \ bin \ phpunit在控制台中打印文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图使用PHPUnit来测试我的应用程序(通过Composer安装了它),但是当我尝试以这种方式执行在我的目录"Tests"中进行的测试时:

I have been trying to use PHPUnit to test my app, (I installed it via Composer) but when I was trying to execute the tests that I have in my directory called "Tests" in this way:

@ myappsite $:php供应商\ bin \ phpunit测试

@myappsite$:php vendor\bin\phpunit Tests

它只是打印了vendor \ bin \ phpunit 的内容:

It just printed the content of vendor\bin\phpunit :

SRC_DIR="`pwd`"
cd "`dirname "$0"`"
cd "../phpunit/phpunit"
BIN_TARGET="`pwd`/phpunit"
cd "$SRC_DIR"
"$BIN_TARGET" "$@"

以前曾遇到此问题并可以帮助我的人.预先感谢.

Somebody that has ran into this problem before and can help me please. Thanks by advance.

推荐答案

好,唯一的问题是 php 命令,这不是必需的,因为不是调用php文件而是调用.bat文件.所以我要做的是:

Ok, The only problem was with php command, It's not necessary because is not calling a php file but a .bat file. So the thing I gotta do was:

@myappsite$:vendor\bin\phpunit Tests

它本身运行php命令.我将其发布给可能遇到相同问题的任何人.

And it itself runs the php command. I posted this for anybody who maybe has the same problem.

这篇关于php vendor \ bin \ phpunit在控制台中打印文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆