标签:
1:首先按照官方指导安装所需组件
For the local installation use following commands:
composer require "codeception/codeception=2.0.*"
composer require "codeception/specify=*"
composer require "codeception/verify=*"
For the global installation you will need to use global
directive:
composer global require "codeception/codeception=2.0.*"
composer global require "codeception/specify=*"
composer global require "codeception/verify=*"
2:安装完后可能会提示缺少数据库的驱动:
可以按照命令 sudo apt-get install php5-mysql 来安装缺少的PHP 组件
3:安装号如上后可能会遇到错误提示如下:
error: ‘Can‘t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock‘ (2)‘
此时可以参照如下方案来解决:
mysql.sock
file is located. In my case it was in /opt/lampp/var/mysql/mysql.sock
sudo Nautilus
mysql.sock
file is located mysqld.sock
then Right click on the file and Cut it/var/run
and create a folder called mysqld
and enter itmysqld.sock
file at /var/run/mysqld/mysqld.sock
:)4:扫平所有问题后,如在测试中有访问数据库,需要配置tests/config/config,配置方法参照config/db
5:在安装过程中注意一个问题,测试环境用的是PHP CLI和APACHE用的不是同一个php
php -i | grep ‘Configuration File‘来查看cli的php版本
编辑一个文件用浏览器打开 <?php phpinfo();?> 来查看阿帕奇的php版本
标签:
原文地址:http://www.cnblogs.com/wlemory/p/4616447.html