Tripal
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest Class Reference
Inheritance diagram for Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest:
Inheritance graph
[legend]
Collaboration diagram for Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest:
Collaboration graph
[legend]

Public Member Functions

 testConnectionConstructorAllDefault ()
 
 testConnectionConstructorTestSchemaDefaultKey ()
 
 testConnectionConstructorNoSchemaDefaultDb ()
 
 testConnectionConstructorTestSchemaDefaultDb ()
 
 testConnectionConstructorSpecialSchemaDefaultKey ()
 
 testConnectionConstructorPublicSchemaDefaultKey ()
 
 testConnectionConstructorReservedSchemaDefaultKey ()
 
 testConnectionConstructorInvalidSchemaDefaultKey ()
 
 testConnectionConstructorTestSchemaInvalidDatabase ()
 
 testConnectionConstructorTestSchemaInvalidKey ()
 
 testConnectionConstructorTestSchemaSecondaryKey ()
 
 testConnectionConstructorSearchPath ()
 
 testSchemaNoSchema ()
 
 testSchemaChange ()
 
 testSchemaNameChangeImpacts ()
 
 testAddExtraSchemaNoSchema ()
 
 testSetExtraSchemaZero ()
 
 testSetExtraSchemaOne ()
 
 testPrefixNoSchema ()
 
 testPrefixNoExtraSchema ()
 
 testConnectionScenario1 ()
 
 testConnectionScenario2 ()
 
 testConnectionScenario3 ()
 
 testTablePrefix ()
 
 testToString ()
 
 testExecuteSqlQueries ()
 
 testExecuteSqlQueriesForceSearchPath ()
 
 testExecuteSqlFile ()
 

Protected Member Functions

 setUp ()
 
 getConnectionMock ( $schema_name='', $database='default', $logger=NULL)
 
 allowTestSchemas ()
 
 get_drupal_prefix ()
 

Protected Attributes

 $proConfigFactory
 
 $configFactory
 
 $proConfig
 
 $config
 

Static Protected Attributes

static $modules = ['tripal']
 

Detailed Description

Tests for Tripal DBX connection on a real database.

@coversDefaultClass \Drupal\tripal\TripalDBX\TripalDbxConnection

@group Tripal @group Tripal TripalDBX @group Tripal TripalDBX Connection

Member Function Documentation

◆ allowTestSchemas()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::allowTestSchemas ( )
protected

Allow a test to use reserved default test schema names.

◆ get_drupal_prefix()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::get_drupal_prefix ( )
protected

HELPER: Retrieve the Drupal table prefix for the current site.

◆ getConnectionMock()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::getConnectionMock (   $schema_name = '',
  $database = 'default',
  $logger = NULL 
)
protected

Builds an initialized TripalDbxConnection mock.

@cover ::__construct

◆ setUp()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::setUp ( )
protected

{}

◆ testAddExtraSchemaNoSchema()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testAddExtraSchemaNoSchema ( )

Tests ::addExtraSchema with no Tripal DBX schema.

@cover ::addExtraSchema

◆ testConnectionConstructorAllDefault()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorAllDefault ( )

Tests constructor: check constructor calls.

@cover ::__construct @cover ::getDatabaseName @cover ::getDatabaseKey @cover ::getMessageLogger

◆ testConnectionConstructorInvalidSchemaDefaultKey()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorInvalidSchemaDefaultKey ( )

Tests constructor: invalid schema, default key.

@cover ::__construct

◆ testConnectionConstructorNoSchemaDefaultDb()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorNoSchemaDefaultDb ( )

Tests constructor: no schema, default database.

@cover ::__construct @cover ::getDatabaseName

◆ testConnectionConstructorPublicSchemaDefaultKey()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorPublicSchemaDefaultKey ( )

Tests constructor: public schema, default key.

@cover ::__construct

◆ testConnectionConstructorReservedSchemaDefaultKey()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorReservedSchemaDefaultKey ( )

Tests constructor: reserved schema, default key.

@cover ::__construct

◆ testConnectionConstructorSearchPath()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorSearchPath ( )

Tests constructor: test search_path isolation.

@cover ::__construct

◆ testConnectionConstructorSpecialSchemaDefaultKey()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorSpecialSchemaDefaultKey ( )

Tests constructor: special character schema, default key.

@cover ::__construct @cover ::getDatabaseName

◆ testConnectionConstructorTestSchemaDefaultDb()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorTestSchemaDefaultDb ( )

Tests constructor: test schema, default database.

@cover ::__construct @cover ::getDatabaseName

◆ testConnectionConstructorTestSchemaDefaultKey()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorTestSchemaDefaultKey ( )

Tests constructor: test schema, default key.

@cover ::__construct

◆ testConnectionConstructorTestSchemaInvalidDatabase()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorTestSchemaInvalidDatabase ( )

Tests constructor: test schema, invalid database.

@cover ::__construct

◆ testConnectionConstructorTestSchemaInvalidKey()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorTestSchemaInvalidKey ( )

Tests constructor: test schema, invalid key.

@cover ::__construct

◆ testConnectionConstructorTestSchemaSecondaryKey()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionConstructorTestSchemaSecondaryKey ( )

Tests constructor: test schema, secondary database key.

@cover ::__construct @cover ::getDatabaseKey

◆ testConnectionScenario1()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionScenario1 ( )

Tests scenario with a Tripal DBX schema and 2 extra.

@cover ::prefixTables @cover ::addExtraSchema @cover ::setExtraSchema

◆ testConnectionScenario2()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionScenario2 ( )

Tests scenario with a Tripal DBX schema and 2 extra.

@cover ::addExtraSchema @cover ::setExtraSchema @cover ::clearExtraSchemas

◆ testConnectionScenario3()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testConnectionScenario3 ( )

Tests scenario for prefixTables with extra schema modified.

@cover ::prefixTables @cover ::addExtraSchema @cover ::setExtraSchema

◆ testExecuteSqlFile()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testExecuteSqlFile ( )

Tests ::executeSqlQueries with force search_path.

@cover ::executeSqlQueries @cover ::query

◆ testExecuteSqlQueries()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testExecuteSqlQueries ( )

Tests ::executeSqlQueries.

@cover ::executeSqlQueries @cover ::query

◆ testExecuteSqlQueriesForceSearchPath()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testExecuteSqlQueriesForceSearchPath ( )

Tests ::executeSqlQueries with force search_path.

@cover ::executeSqlQueries @cover ::query

◆ testPrefixNoExtraSchema()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testPrefixNoExtraSchema ( )

Tests ::prefixTables with a Tripal DBX schema but no extra.

@cover ::prefixTables

◆ testPrefixNoSchema()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testPrefixNoSchema ( )

Tests ::prefixTables with no Tripal DBX schema.

@cover ::prefixTables

◆ testSchemaChange()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testSchemaChange ( )

Tests schema name changes with TripalDbxSchema object.

@cover ::schema @cover ::setSchemaName

◆ testSchemaNameChangeImpacts()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testSchemaNameChangeImpacts ( )

Tests schema name changes impacts on other members and methods.

@cover ::schema @cover ::setSchemaName @cover ::getVersion @cover ::findVersion @cover ::getQuotedSchemaName @cover ::addExtraSchema @cover ::getExtraSchemas @cover ::prefixTables

◆ testSchemaNoSchema()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testSchemaNoSchema ( )

Tests ::schema when no schema was set.

@cover ::schema

◆ testSetExtraSchemaOne()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testSetExtraSchemaOne ( )

Tests ::setExtraSchema with index 1.

@cover ::setExtraSchema

◆ testSetExtraSchemaZero()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testSetExtraSchemaZero ( )

Tests ::setExtraSchema with index 0.

@cover ::setExtraSchema

◆ testTablePrefix()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testTablePrefix ( )

Tests ::tablePrefix.

@cover ::tablePrefix

◆ testToString()

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::testToString ( )

Tests ::__toString.

@cover ::__toString

Member Data Documentation

◆ $modules

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::$modules = ['tripal']
staticprotected

{}

◆ $proConfigFactory

Drupal\Tests\tripal\Kernel\TripalDBX\ConnectionTest::$proConfigFactory
protected

Test members.

"pro*" members are prophesize objects while their "non-pro*" equivqlent are the revealed objects.


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