1: <?php
2:
3: require_once dirname(__FILE__) . '/TestBase.php';
4:
5: /**
6: * API tests for Whups.
7: *
8: * Copyright 2007-2012 Horde LLC (http://www.horde.org/)
9: *
10: * @author Michael J. Rubinsky <mrubinsk@horde.org>
11: * @package Whups
12: * @subpackage UnitTests
13: */
14: class Whups_ApiTest Extends Whups_TestBase {
15: function setUp()
16: {
17: parent::setUp();
18: require_once WHUPS_BASE . '/lib/api.php';
19: }
20:
21: function test_listQueues_returns_hash()
22: {
23: $GLOBALS['perms'] = new Whups_Test_Perms();
24: $result = _whups_listQueues();
25:
26: // Validate the results
27: $this->assertEquals('queue one', $result[1]);
28: $this->assertEquals('queue three', $result[3]);
29: }
30:
31: }
32: