MediaWiki REL1_33
DBConnRefTest Class Reference

Wikimedia\Rdbms\DBConnRef. More...

Inheritance diagram for DBConnRefTest:
Collaboration diagram for DBConnRefTest:

Public Member Functions

 provideRoleExceptions ()
 
 testClose ()
 Wikimedia\Rdbms\DBConnRef::close \Wikimedia\Rdbms\DBUnexpectedError.
 
 testConstruct ()
 
 testConstruct_failure ()
 
 testConstruct_params ()
 
 testDestruct ()
 
 testGetDomainID ()
 Wikimedia\Rdbms\DBConnRef::getDomainId.
 
 testGetReferenceRole ()
 Wikimedia\Rdbms\DBConnRef::getReferenceRole.
 
 testRoleExceptions ( $method, $args)
 Wikimedia\Rdbms\DBConnRef::getReferenceRole Wikimedia\Rdbms\DBReadOnlyRoleError provideRoleExceptions.
 
 testSelect ()
 Wikimedia\Rdbms\DBConnRef::select.
 
 testToString ()
 

Private Member Functions

 getDatabaseMock ()
 
 getDBConnRef (ILoadBalancer $lb=null)
 
 getLoadBalancerMock ()
 
 innerMethodForTestDestruct (ILoadBalancer $lb)
 

Detailed Description

Wikimedia\Rdbms\DBConnRef.

Definition at line 13 of file DBConnRefTest.php.

Member Function Documentation

◆ getDatabaseMock()

DBConnRefTest::getDatabaseMock ( )
private
Returns
IDatabase

Definition at line 42 of file DBConnRefTest.php.

References and(), and use.

Referenced by getDBConnRef(), getLoadBalancerMock(), testConstruct(), and testConstruct_params().

◆ getDBConnRef()

DBConnRefTest::getDBConnRef ( ILoadBalancer $lb = null)
private
Returns
IDatabase

Definition at line 76 of file DBConnRefTest.php.

References DB_MASTER, getDatabaseMock(), and getLoadBalancerMock().

Referenced by getLoadBalancerMock(), testSelect(), and testToString().

◆ getLoadBalancerMock()

DBConnRefTest::getLoadBalancerMock ( )
private

◆ innerMethodForTestDestruct()

DBConnRefTest::innerMethodForTestDestruct ( ILoadBalancer $lb)
private

Definition at line 126 of file DBConnRefTest.php.

References and(), DB_REPLICA, and Wikimedia\Rdbms\ILoadBalancer\getConnectionRef().

Referenced by testDestruct().

◆ provideRoleExceptions()

DBConnRefTest::provideRoleExceptions ( )

Definition at line 211 of file DBConnRefTest.php.

◆ testClose()

DBConnRefTest::testClose ( )

Wikimedia\Rdbms\DBConnRef::close \Wikimedia\Rdbms\DBUnexpectedError.

Definition at line 176 of file DBConnRefTest.php.

References DB_MASTER, DB_REPLICA, and getLoadBalancerMock().

◆ testConstruct()

DBConnRefTest::testConstruct ( )

Definition at line 81 of file DBConnRefTest.php.

References and(), DB_MASTER, getDatabaseMock(), and getLoadBalancerMock().

◆ testConstruct_failure()

DBConnRefTest::testConstruct_failure ( )

Definition at line 132 of file DBConnRefTest.php.

References and(), DB_REPLICA, and getLoadBalancerMock().

◆ testConstruct_params()

DBConnRefTest::testConstruct_params ( )

Definition at line 88 of file DBConnRefTest.php.

References and(), DB_MASTER, DB_REPLICA, and getDatabaseMock().

◆ testDestruct()

DBConnRefTest::testDestruct ( )

Definition at line 117 of file DBConnRefTest.php.

References and(), getLoadBalancerMock(), and innerMethodForTestDestruct().

◆ testGetDomainID()

DBConnRefTest::testGetDomainID ( )

Wikimedia\Rdbms\DBConnRef::getDomainId.

Definition at line 142 of file DBConnRefTest.php.

References and(), and DB_REPLICA.

◆ testGetReferenceRole()

DBConnRefTest::testGetReferenceRole ( )

Wikimedia\Rdbms\DBConnRef::getReferenceRole.

Definition at line 185 of file DBConnRefTest.php.

References and(), DB_MASTER, DB_REPLICA, and getLoadBalancerMock().

◆ testRoleExceptions()

DBConnRefTest::testRoleExceptions ( $method,
$args )

Wikimedia\Rdbms\DBConnRef::getReferenceRole Wikimedia\Rdbms\DBReadOnlyRoleError provideRoleExceptions.

Definition at line 205 of file DBConnRefTest.php.

References $args, DB_REPLICA, and getLoadBalancerMock().

◆ testSelect()

DBConnRefTest::testSelect ( )

Wikimedia\Rdbms\DBConnRef::select.

Definition at line 157 of file DBConnRefTest.php.

References and(), and getDBConnRef().

◆ testToString()

DBConnRefTest::testToString ( )

Definition at line 163 of file DBConnRefTest.php.

References and(), DB_MASTER, getDBConnRef(), and getLoadBalancerMock().


The documentation for this class was generated from the following file: