PHP zendframework phpunit in-depth

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.