phpunit.xml配置之后,总是“No tests executed”
The filenames must end with "Test.php". This is what PHPUnit is looking for within directories.
其实这是默认情况,但可以指定文件后缀的(suffix),具体是写在directory
后面,例如这样的:
The filenames must end with "Test.php". This is what PHPUnit is looking for within directories.
其实这是默认情况,但可以指定文件后缀的(suffix),具体是写在directory
后面,例如这样的:
到现在,自从我写下第一行Hello World
,已经第4个年头了。现在是美国某小型物流公司的前端程序员,用Vuejs写一个内部物流管理系统的前端web app。
我一个写PHP的程序员,怎么开始写Vue了呢?
好的,上面的都是闲话,基本上可以认为,我转行是成功的,不是说走向人生巅峰啊,而是说,我成了一个有人要的程序员。而且努力刷leetcode
,准备跳槽。
我最近自信增长很快。
一方面,努力了很多天,终于在packagist
上发布了一个库ArchPHP/Doraemon
,过程还是很曲折的,并非技术原因。写这个库的过程中,进一步加深了对PHP的理解和掌握。
/g
这个modifier,如果想全局匹配,要用preg_match_all()
函数/u
这个modifier原文:http://michaelnthiessen.com/force-re-render/
标题: The correct way to force Vue to re-render a componentThe best way to force Vue to re-render a component is to set a :key on the component. When you need the component to be re-rendered, you just change the value of the key and Vue will re-render the component.
- The horrible way: reloading the entire page
- The terrible way: using the v-if hack
- The better way: using Vue’s built-in forceUpdate method
- The best way: key-changing on your component
php -S localhost:8080
即可;如果要指定某个具体目录里的index.php
或index.html
,需要加个-t
选项,例如,php -S localhost:8080 -t public/
最近对PHP开始进行深入探索,第一次写原生PHP,没有任何框架,纯手动实现一切功能,还是有很多收获的。
首先,composer是个神器,其实composer已经不是原生PHP了, 但对于你想利用namespace这么一个重要的feature,还是非常重要的。
其次,PHPUnit,是每一个PHPer必须掌握的东西。一个能够让别人放心、让自己放心的库或者app,必须写测试。
第三,PHP Session需要了解东西还不少,以前无所谓,只是知道在server端存用户的信息,至于怎么玩的,深入机制不了解。比如,session data其实是存在某处,php.ini
这个文件里有配置项;比如session_start()
函数要在很多每一页面都开启,才能实现跨页面间session数据的共享,等等吧。
需要继续深入研究,考虑自己写一个库,我对机器人很感兴趣,有考虑自己写一个。