Class Turba_TestBase

Description

Base class for Turba test cases

$Horde: turba/lib/tests/TestBase.php,v 1.3.2.1 2007/12/20 14:34:31 jan Exp $

Located in /lib/tests/TestBase.php (line 11)

PHPUnit_Framework_TestCase
   |
   --Turba_TestBase
Direct descendents
Class Description
 class Turba_ApiTest $Horde: turba/lib/tests/ApiTest.php,v 1.2.2.1 2007/12/20 14:34:31 jan Exp $
 class Turba_BrowsePageTest $Horde: turba/lib/tests/BrowsePageTest.php,v 1.3.2.1 2007/12/20 14:34:31 jan Exp $
 class Turba_DriverTest Test cases for the Turba_Driver:: class
 class Turba_GroupTest $Horde: turba/lib/tests/GroupTest.php,v 1.2.2.1 2007/12/20 14:34:31 jan Exp $
 class Turba_ListTest $Horde: turba/lib/tests/ListTest.php,v 1.2.2.1 2007/12/20 14:34:31 jan Exp $
 class Turba_ListViewTest $Horde: turba/lib/tests/ListViewTest.php,v 1.2.2.1 2007/12/20 14:34:31 jan Exp $
 class Turba_ViewBrowseTest $Horde: turba/lib/tests/ViewBrowseTest.php,v 1.3.2.1 2007/12/20 14:34:31 jan Exp $
Variable Summary
Method Summary
 boolean assertOk (mixed $result)
 void assertSortsList ( $callback)
 void fakeAuth ()
 object PEAR getDb ()
 object Initialized getDriver ()
 void getDriverConfig ()
 void setUp ()
 void setUpDatabase ()
 void _insert ( $object)
Variables
mixed $_driver (line 13)
mixed $_driverConfig = array(
'title' => "My Address Book",
'type' => 'sql',
'params' => null,
'map' => array(
'__key' => 'object_id',
'__owner' => 'owner_id',
'__type' => 'object_type',
'__members' => 'object_members',
'__uid' => 'object_uid',
'name' => 'object_name',
'email' => 'object_email',
'alias' => 'object_alias',
'homeAddress' => 'object_homeaddress',
'workAddress' => 'object_workaddress',
'homePhone' => 'object_homephone',
'workPhone' => 'object_workphone',
'cellPhone' => 'object_cellphone',
'fax' => 'object_fax',
'title' => 'object_title',
'company' => 'object_company',
'notes' => 'object_notes',
'pgpPublicKey' => 'object_pgppublickey',
'smimePublicKey' => 'object_smimepublickey',
'freebusyUrl' => 'object_freebusyurl'
),'search'=>array('name','email'),'strict'=>array('object_id','owner_id','object_type',),'export'=>true,'browse'=>true,'use_shares'=>false,)
(line 14)
mixed $_fixtures = array(array('object_id' => 'aaa',
'object_type' => 'Object',
'owner_id' => '1',
'object_name' => 'Jason Felice',
'object_company' => 'Cronosys, LLC'),array('object_id'=>'bbb','object_type'=>'Object','owner_id'=>'1','object_name'=>'Joe Fabetes','object_company'=>'Example, Inc.'),array('object_id'=>'ccc','object_type'=>'Object','owner_id'=>'1','object_name'=>'Alice Z','object_company'=>'Example, Inc.'),array('object_id'=>'ddd','object_type'=>'Object','owner_id'=>'1','object_name'=>'Zoe A','object_company'=>'Example, Inc.'),array('object_id'=>'eee','object_type'=>'Object','owner_id'=>'1','object_name'=>'Alan Garrison','object_company'=>'Cronosys, LLC'),array('object_id'=>'fff','owner_id'=>'1','object_type'=>'Group','object_name'=>'Test Group','object_members'=>'a:5:{i:0;s:3:"aaa";i:1;s:3:"bbb";i:2;s:3:"ccc";i:3;s:3:"ddd";i:4;s:3:"eee";}'),array('object_id'=>'ggg','owner_id'=>'1','object_type'=>'Group','object_name'=>'Alpha First Group','object_members'=>'a:4:{i:0;s:3:"aaa";i:1;s:3:"bbb";i:2;s:3:"ccc";i:3;s:3:"ddd";}'))
(line 54)
mixed $_groups = array("Test Group", "Alpha First Group") (line 92)
mixed $_sortedByCompanyThenLastname = array('Jason Felice', 'Alan Garrison',
'Zoe A', 'Joe Fabetes',
'Alice Z')
(line 93)
mixed $_sortedByCompanyThenLastnameDesc = array('Alan Garrison',
'Jason Felice',
'Alice Z', 'Joe Fabetes',
'Zoe A')
(line 96)
mixed $_sortedByLastname = array('Zoe A', 'Joe Fabetes', 'Jason Felice',
'Alan Garrison', 'Alice Z')
(line 90)
Methods
assertOk (line 150)

Asserts that the supplied result is not a PEAR_Error

Fails with a descriptive message if so

  • return: Whether the assertion was successful
boolean assertOk (mixed $result)
  • mixed $result: The value to check
assertSortsList (line 204)
void assertSortsList ( $callback)
  • $callback
fakeAuth (line 250)
void fakeAuth ()
getDb (line 137)

Gets the driver's database connection

FIXME: Should use acceptance environment's method of connecting, and treat the driver more opaquely.

  • return: DB reference
object PEAR getDb ()
getDriver (line 107)

Retrieves an SQL driver instance.

  • return: Turba_Driver_sql:: instance connected to the test database.
object Initialized getDriver ()
getDriverConfig (line 118)
void getDriverConfig ()
getList (line 264)

Constructs and returns a Turba_List:: object populated with items

Turba_List getList ()
setUpDatabase (line 173)
void setUpDatabase ()
_insert (line 191)
void _insert ( $object)
  • $object

Documentation generated on Sun, 30 Jan 2011 05:39:27 +0000 by phpDocumentor 1.4.3