44 * Sample bootstrap file (as used for jr_cr)
55 *
66 * This file does some basic stuff that's project specific.
7- * Please copy the file for your project and make sure phpunit.xml includes
7+ * Please copy the file for your project and make sure phpunit.xml includes
88 * this file.
9- *
9+ *
1010 * function getRepository(config) which returns the repository
1111 * function getJCRSession(config) which returns the session
1212 *
2424 }
2525}
2626
27- /**
27+ /**
2828 * autoloader: jackalope-api-tests relies on this autoloader.
2929 */
3030function jackalopeApiTestsAutoload ($ class ) {
@@ -37,11 +37,27 @@ function jackalopeApiTestsAutoload($class) {
3737}
3838spl_autoload_register ('jackalopeApiTestsAutoload ' );
3939
40+ /**
41+ * @return string classname of the repository factory
42+ */
43+ function getRepositoryFactoryClass ()
44+ {
45+ return 'Jackalope\RepositoryFactoryJackrabbit ' ;
46+ }
47+
48+ /**
49+ * @return hashmap to be used with the repository factory
50+ */
51+ function getRepositoryFactoryParameters ($ config )
52+ {
53+ return array ('jackalope.jackrabbit_uri ' => $ config ['url ' ]);
54+ }
55+
4056/**
4157 * Repository lookup is implementation specific.
4258 * @param config The configuration where to find the repository
4359 * @return the repository instance
44- */
60+ */
4561function getRepository ($ config ) {
4662 if (empty ($ config ['url ' ]) || empty ($ config ['transport ' ])) {
4763 return false ;
@@ -58,7 +74,7 @@ function getSimpleCredentials($user, $password) {
5874 return new jr_cr_simplecredentials ($ user , $ password );
5975}
6076
61- /**
77+ /**
6278 * Get a session for this implementation.
6379 * @param config The configuration that is passed to getRepository
6480 * @param credentials The credentials to log into the repository. If omitted, $config['user'] and $config['pass'] is used with getSimpleCredentials
0 commit comments