Overview

Packages

  • Test

Classes

  • Horde_Test_AllTests
  • Horde_Test_Case
  • Horde_Test_Exception
  • Horde_Test_Factory_Alarm
  • Horde_Test_Factory_Cache
  • Horde_Test_Factory_Db
  • Horde_Test_Factory_Group
  • Horde_Test_Factory_History
  • Horde_Test_Factory_KolabStorage
  • Horde_Test_Factory_Perms
  • Horde_Test_Factory_Prefs
  • Horde_Test_Factory_Registry
  • Horde_Test_Factory_Session
  • Horde_Test_Factory_Share
  • Horde_Test_Functional
  • Horde_Test_Log
  • Horde_Test_Setup
  • Horde_Test_Stub_Cli
  • Horde_Test_Stub_Factory
  • Horde_Test_Stub_Parser
  • Horde_Test_Stub_Registry
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * Generates the history service for testing purposes.
 4:  *
 5:  * PHP version 5
 6:  *
 7:  * @category Horde
 8:  * @package  Test
 9:  * @author   Gunnar Wrobel <wrobel@pardus.de>
10:  * @license  http://www.horde.org/licenses/lgpl21 LGPL
11:  * @link     http://www.horde.org/components/Horde_Test
12:  */
13: 
14: /**
15:  * Generates the history service for testing purposes.
16:  *
17:  * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
18:  *
19:  * See the enclosed file COPYING for license information (LGPL). If you
20:  * did not receive this file, see http://www.horde.org/licenses/lgpl21.
21:  *
22:  * @since Horde_Test 1.2.0
23:  *
24:  * @category Horde
25:  * @package  Test
26:  * @author   Gunnar Wrobel <wrobel@pardus.de>
27:  * @license  http://www.horde.org/licenses/lgpl21 LGPL
28:  * @link     http://www.horde.org/components/Horde_Test
29:  */
30: class Horde_Test_Factory_History
31: {
32:     /**
33:      * Create a mock history service for testing.
34:      *
35:      * @params array $params Additional options.
36:      * <pre>
37:      * 'user' - (string) The current user.
38:      * </pre>
39:      *
40:      * @return Horde_History The test service.
41:      */
42:     public function create($params)
43:     {
44:         if (!class_exists('Horde_History')) {
45:             throw new Horde_Test_Exception('The "Horde_History" class is unavailable!');
46:         }
47:         return new Horde_History_Mock($params['user']);
48:     }
49: }
API documentation generated by ApiGen