1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-12 23:09:15 +01:00
OwncloudContactsOfficial/tests/bootstrap.php
Vincent Petry 0b5fb1bfc7 Fix to make it compatible with Sabre 2.1
Also fixed unit tests so they run but some still fail

- Added IUserSession mock
- Replaced OCP::getUser() with IUserSession usage to make the mock work
- Added base class for test cases
2015-03-17 12:53:05 +01:00

23 lines
470 B
PHP

<?php
global $RUNTIME_NOAPPS;
$RUNTIME_NOAPPS = true;
if(!defined('PHPUNIT_RUN')) {
define('PHPUNIT_RUN', 1);
}
require_once __DIR__.'/../../core/lib/base.php';
if(!class_exists('PHPUnit_Framework_TestCase')) {
require_once('PHPUnit/Autoload.php');
}
include_once('lib/testcase.php');
//OC_App::enable('contacts');
OC_Hook::clear();
OC_Log::$enabled = true;
\OCP\Util::connectHook('OCA\Contacts', 'pre_deleteContact', '\OCA\Contacts\Hooks', 'contactDeletion');