MediaWiki  master
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. More...
 
 testConstruct ()
 
 testConstruct_failure ()
 
 testConstruct_params ()
 
 testDestruct ()
 
 testGetDomainID ()
 Wikimedia\Rdbms\DBConnRef::getDomainId. More...
 
 testGetReferenceRole ()
 Wikimedia\Rdbms\DBConnRef::getReferenceRole. More...
 
 testRoleExceptions ( $method, $args)
 Wikimedia\Rdbms\DBConnRef::getReferenceRole Wikimedia\Rdbms\DBReadOnlyRoleError provideRoleExceptions. More...
 
 testSelect ()
 Wikimedia\Rdbms\DBConnRef::select. More...
 
 testToString ()
 

Private Member Functions

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

Detailed Description

Wikimedia\Rdbms\DBConnRef.

Definition at line 12 of file DBConnRefTest.php.

Member Function Documentation

◆ getDatabaseMock()

DBConnRefTest::getDatabaseMock ( )
private
Returns
IDatabase

Definition at line 41 of file DBConnRefTest.php.

References class, and use.

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

◆ getDBConnRef()

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

Definition at line 69 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 119 of file DBConnRefTest.php.

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

Referenced by testDestruct().

◆ provideRoleExceptions()

DBConnRefTest::provideRoleExceptions ( )

Definition at line 204 of file DBConnRefTest.php.

◆ testClose()

DBConnRefTest::testClose ( )

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

Definition at line 169 of file DBConnRefTest.php.

References DB_MASTER, DB_REPLICA, and getLoadBalancerMock().

◆ testConstruct()

DBConnRefTest::testConstruct ( )

Definition at line 74 of file DBConnRefTest.php.

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

◆ testConstruct_failure()

DBConnRefTest::testConstruct_failure ( )

Definition at line 125 of file DBConnRefTest.php.

References class, DB_REPLICA, and getLoadBalancerMock().

◆ testConstruct_params()

DBConnRefTest::testConstruct_params ( )

Definition at line 81 of file DBConnRefTest.php.

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

◆ testDestruct()

DBConnRefTest::testDestruct ( )

Definition at line 110 of file DBConnRefTest.php.

References getLoadBalancerMock(), and innerMethodForTestDestruct().

◆ testGetDomainID()

DBConnRefTest::testGetDomainID ( )

Wikimedia\Rdbms\DBConnRef::getDomainId.

Definition at line 135 of file DBConnRefTest.php.

References class, and DB_REPLICA.

◆ testGetReferenceRole()

DBConnRefTest::testGetReferenceRole ( )

Wikimedia\Rdbms\DBConnRef::getReferenceRole.

Definition at line 178 of file DBConnRefTest.php.

References DB_MASTER, DB_REPLICA, and getLoadBalancerMock().

◆ testRoleExceptions()

DBConnRefTest::testRoleExceptions (   $method,
  $args 
)

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

Definition at line 198 of file DBConnRefTest.php.

References $args, DB_REPLICA, and getLoadBalancerMock().

◆ testSelect()

DBConnRefTest::testSelect ( )

Wikimedia\Rdbms\DBConnRef::select.

Definition at line 150 of file DBConnRefTest.php.

References class, and getDBConnRef().

◆ testToString()

DBConnRefTest::testToString ( )

Definition at line 156 of file DBConnRefTest.php.

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


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