Install package Management Curl-ss https://Getcomposer.org/installer |/usr/local/php/bin/phpInstall the certificate into~$mkdir~/tools/https-CA~$ CD ~/tools/https-Mans~$ Curl http://Curl.haxx.se/ca/cacert.pem-o Cacert.pemaddress in/users/jackluo/tools/https-ca/Cacert.pem then modify the php.ini file Openssl.cafile=/users/jackluo/tools/https-ca/Cacert.pem Download File/usr/local/php/bin/php composer Create-project--repository-url="http://packages.zendframework.com"zendframework/skeleton-application. Nginx pseudo static setting server {Listen the; server_name www.example.com; Root/var/www/www.example.com/MyApplication; Index index.html index.htm index.php; Location/{try_files $uri $uri/ /Index.php$is_args$args; } Location~\.php$ {fastcgi_pass Unix:/usr/local/zend/tmp/php-Fastcgi.socket; Fastcgi_param script_filename $document _root$fastcgi_script_name; Include Fastcgi_params; }} install pear$ CD/usr/Localcurl http://pear.php.net/go-pear | sudo/usr/local/php/bin/phpwhichpear$VI~/. Bash_profilephp.ini Modify Include_path="/usr/local/bin:.:/ Php/includes"
<?PHPclassDatatestextendsphpunit_framework_testcase{/** * @dataProvider additionprovider*/ Public functionTestadd ($a,$b,$expected) { $this->assertequals ($expected,$a+$b); } Public functionAdditionprovider () {return Array( Array(0, 0, 0),Array(0, 1, 1),Array(1, 0, 1),Array(1, 1, 3) ); }}?>
[Email protected]:~/works/php $phpunit datatestphpunit4.4.1by Sebastian Bergmann .... Ftime: +MS, Memory:3. 50MbThere was1failure:1) Datatest::testadd with Data set #3(1,1,3) Failed asserting that2Matches expected3./users/jackluo/works/php/datatest.php:9Failures!Tests:4, assertions:4, Failures:1. [Email protected]-macbook-pro:~/works/php $
PHP zendframework phpunit in-depth