1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
<?php
/**
* Basic Ansel test case.
*
* PHP version 5
*
* @category Horde
* @package Ansel
* @subpackage UnitTests
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/gpl GPL-2.0
* @link http://www.horde.org/apps/ansel
*/
/**
* Basic Ansel test case.
*
* Copyright 2011-2017 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.horde.org/licenses/gpl.
*
* @category Horde
* @package Ansel
* @subpackage UnitTests
* @author Michael J Rubinsky <mrubinsk@horde.org>
* @license http://www.horde.org/licenses/gpl GPL-2.0
* @link http://www.horde.org/apps/ansel
*/
class Ansel_TestCase
extends Horde_Test_Case
{
static protected function createBasicAnselSetup(Horde_Test_Setup $setup)
{
$setup->setup(
array(
'_PARAMS' => array(
'user' => 'test@example.com',
'app' => 'ansel'
),
// 'Horde_Core_Factory_Vfs' => array(
// 'factory' => 'Ansel_Unit_Factory_Vfs',
// 'method' => 'create')
'Horde_Group' => 'Group',
'Horde_Perms' => 'Perms',
'Horde_Prefs' => 'Prefs',
'Horde_Share' => 'Share',
'Horde_Registry' => 'Registry',
)
);
$setup->makeGlobal(
array(
'prefs' => 'Horde_Prefs',
'registry' => 'Horde_Registry',
'injector' => 'Horde_Injector',
)
);
// TODO: need separate test bundles
$GLOBALS['conf']['image']['driver'] = 'Gd';
$GLOBALS['conf']['image']['type'] = 'jpg';
$GLOBALS['conf']['exif']['driver'] = 'Bundled';
}
static protected function createTestVFS(Horde_Test_Setup $setup)
{
$setup->getInjector()->setInstance(
'Ansel_Vfs',
new Horde_Vfs_File(array('vfsroot' => __DIR__ . '/fixtures/vfs'))
);
$setup->getInjector()->setInstance(
'Horde_Core_Factory_Vfs',
new Horde_Test_Stub_Factory(
$setup->getInjector()->getInstance('Ansel_Vfs')
)
);
}
}
|