jackalope / jackalope-api-tests

Functional testing for the PHPCR API based on Jackalope implementation

This URL has Read+Write access

dbu (author)
Wed Nov 18 03:02:53 -0800 2009
commit  061421ad5b863f2537cddda47554ba94d8d7925f
tree    dc92a1d3657214f94297d1e0e15d9612448361e4
parent  ae87bb9af2617a532ba5e28e2001c3f925b4c958
name age message
file .gitignore Fri Jul 10 07:15:17 -0700 2009 Initial cleanup [Tobias Ebnöther]
file README Fri Oct 30 09:55:42 -0700 2009 adjusting to jsr 283 and various bugfixing. [dbu]
directory bin/ Tue Nov 17 02:56:00 -0800 2009 Updated to connect to jackrabbit2.0-beta1 [Tobias Ebnöther]
directory fixtures/ Wed Nov 18 02:41:02 -0800 2009 implemented more tests, partially fixed binary. [dbu]
directory inc/ Fri Oct 30 09:55:42 -0700 2009 adjusting to jsr 283 and various bugfixing. [dbu]
directory lib/ Wed Nov 18 02:41:02 -0800 2009 implemented more tests, partially fixed binary. [dbu]
file phpunit.xml Fri Jul 10 07:15:17 -0700 2009 Initial cleanup [Tobias Ebnöther]
file run.sh Tue Nov 17 05:11:38 -0800 2009 updating tests for jsr 283, jcr 2.0 [dbu]
directory tests/ Wed Nov 18 03:02:53 -0800 2009 got confused with naming. reverting rename of b... [dbu]
README
*******************
Jackalope API tests
*******************
http://liip.to/jackalope

ebi at liip.ch
david at liip.ch
chregu at liip.ch

*****
Usage
*****

Run phpunit inside of the root directory.

For usage with Zend you probably have to execute it manually like
this:

/usr/local/zend/bin/php-cli /usr/local/zend/bin/phpunit tests/level1/ReadTest.php

Customization
*************

How to test your own code:
You need to change the phpunit.xml and write your own bootstrap file. The file
needs to provide the following:
function getRepository(config) which returns the repository
function getJCRSession(config) which returns the session
function getSimpleCredentials(user, password) which returns simpleCredentials
constants necessary to the JCR 1.0/JSR-170 specs

*****
Setup
*****

Setting up submodules
*********************

After the first clone, don't forget to

git submodule init
git submodule update

Dependencies
************

java in PATH
PHPUnit in PATH
PHPUnit in include_path

Installing PHPUnit
******************
Make sure you use the pear from Zend.
See http://www.phpunit.de/manual/current/en/installation.html
$  /usr/local/zend/bin/pear install phpunit

Setting up Jackrabbit
*********************
- Create tests workspace which is different from your default workspace.
See http://jackrabbit.apache.org/jackrabbit-configuration.html#JackrabbitConfiguration-Workspaceconfiguration
Or:
- Go to the directory you started jackrabbit-standalone (eg. /opt/svn/jackrabbit/jackrabbit-standalone/target)
- cd jackrabbit
- cd workspaces
- cp -r default tests
- cd tests
- change <Workspace name="default"> to <Workspace name="tests">
- start jackrabbit again



**************
Implementation
**************

This code defines a set of unit tests against the PHPCR interfaces.
The tests are oriented at the javadoc of the JSR 283 interfaces.

tests/level1 contains tets for the base read functionality.

Packages at least partially for level1:
javax.jcr               => ReadTest, AccessTest, ExportTest, NamespaceTest
javax.jcr.query         must support javax.jcr.query.JCR-JQOM and javax.jcr.query.JCR-SQL2 => SearchTest
javax.jcr.query.qom     Specify query object model => QueryObjectModelTest
javax.jcr.nodetype      => NodeTypesTest
javax.jcr.util

Packages used for additional features
javax.jcr.lock          Repository.OPTION_LOCKING_SUPPORTED => LockTest
javax.jcr.observation   Repository.OPTION_OBSERVATION_SUPPORTED or Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED
javax.jcr.retention     Repository.OPTION_RETENTION_SUPPORTED
javax.jcr.security      Repository.OPTION_ACCESS_CONTROL_SUPPORTED => AccessControlTest
javax.jcr.version       Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED and Repository.OPTION_VERSIONING_SUPPORTED