PHP Couchbase Tests
This is an extensive testsuite for the PHP couchbase client. This is a work in progress to convert existing tests into the new format.
For the new-style tests, you should chdir into the
unit directory. You will need to edit the
couchbase.local.inc with your cluster parameters (testing against a mock server is not yet supported)..
and run something like
# set LD_LIBRARY_PATH if you are testing against a libcouchbase not in the # standard linker search path # LD_LIBRARY_PATH=/sources/lcb2.0-repo/install EXTDIR=~/src/php-ext-couchbase export EXTDIR export LD_LIBRARY_PATH ./runtest.pl --debug --process-isolation -c test.xml
process-isolation flag runs each test in its own process. This is because some tests will segfault or otherwise lead to memory corruption.
You need to have
PHPUnit installed for the new tests. Debian includes a
phpunit package. It can also be obtained via PEAR (see https://github.com/sebastianbergmann/phpunit#installation for instructions).
pwrap.sh script is a wrapper around the
phpunit executable, which sets up the appropriate locations for finding the couchbase extension
On Darwin/OS X systems, the environment variable is
There is a
cbc-like program located in
For more information.
EXTDIR variable must be set for this program as well, as per the