diff --git a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php index 372dc9f..7d03abd 100644 --- a/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php +++ b/core/tests/Drupal/Tests/Core/Database/ConnectionTest.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\system\Tests\Database\ConnectionTest. + * Contains Drupal\system\Tests\Database\ConnectionTest. */ namespace Drupal\Tests\Core\Database; @@ -19,6 +19,9 @@ */ class ConnectionTest extends UnitTestCase { + /** + * {@inheritdoc} + */ public static function getInfo() { return array( 'name' => 'Connection Test', @@ -27,6 +30,14 @@ public static function getInfo() { ); } + /** + * Dataprovider for testPrefixRoundTrip(). + * + * @return array + * Array of arrays with the following elements: + * - Arguments to pass to Connection::setPrefix(). + * - Expected result from Connection::tablePrefix(). + */ public function providerPrefixRoundTrip() { return array ( array ( @@ -68,6 +79,15 @@ public function testPrefixRoundTrip($expected, $prefixInfo) { } } + /** + * Dataprovider for testPrefixTables(). + * + * @return array + * Array of arrays with the following elements: + * - Expected result. + * - Table prefix. + * - Query to be prefixed. + */ public function providerTestPrefixTables() { return array ( array ( @@ -97,6 +117,14 @@ public function testPrefixTables($expected, $prefixInfo, $query) { $this->assertEquals($expected, $connection->prefixTables($query)); } + /** + * Dataprovider for testEscapeMethods(). + * + * @return array + * Array of arrays with the following elements: + * - Expected escaped string. + * - String to escape. + */ public function providerEscapeMethods() { return array ( array ('thing', 'thing'), @@ -126,6 +154,16 @@ public function testEscapeMethods($expected, $name) { $this->assertEquals($expected, $connection->escapeAlias($name)); } + /** + * Dataprovider for testGetDriverClass(). + * + * @return array + * Array of arrays with the following elements: + * - Expected namespaced class name. + * - Driver. + * - Namespace. + * - Class name without namespace. + */ public function providerGetDriverClass() { return array ( array( @@ -162,6 +200,15 @@ public function testGetDriverClass($expected, $driver, $namespace, $class) { $this->assertEquals($expected, $connection->getDriverClass($class)); } + /** + * Dataprovider for testSchema(). + * + * @return array + * Array of arrays with the following elements: + * - Expected namespaced class of schema object. + * - Driver for PDO connection. + * - Namespace for connection. + */ public function providerSchema() { return array ( array( @@ -173,7 +220,7 @@ public function providerSchema() { } /** - * Test schema(). + * Test Connection::schema(). * * @dataProvider providerSchema */ @@ -204,6 +251,14 @@ public function testDestroy() { $this->assertAttributeEquals(NULL, 'schema', $connection); } + /** + * Dataprovider for testMakeComments(). + * + * @return array + * Array of arrays with the following elements: + * - Expected filtered comment. + * - Arguments for Connection::makeComment(). + */ public function providerMakeComments() { return array( array ('/* */ ', array ('')), @@ -222,6 +277,14 @@ public function testMakeComments($expected, $commentArray) { $this->assertEquals($expected, $connection->makeComment($commentArray)); } + /** + * Dataprovider for testFilterComments(). + * + * @return array + * Array of arrays with the following elements: + * - Expected filtered comment. + * - Comment to filter. + */ public function providerFilterComments() { return array( array ('', ''),