Extended tests for PHP couchbase extension
C PHP Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
unit
utils
Doxyfile
README.pod
doxyfilt.pl

README.pod

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.

Usage

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

The 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).

the 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 DYLD_LIBRARY_PATH.

Goodies

There is a cbc-like program located in utils. Run

./pcbc help

For more information.

The EXTDIR variable must be set for this program as well, as per the pwrap.sh script

M. Nunberg