File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010use Joomla \Database \Exception \ExecutionFailureException ;
1111use Joomla \Test \DatabaseTestCase ;
1212
13+ /**
14+ * Test class for Joomla\Database\Pgsql\PgsqlStatement
15+ */
1316class PgsqlPreparedStatementTest extends DatabaseTestCase
1417{
1518 /**
@@ -19,14 +22,11 @@ class PgsqlPreparedStatementTest extends DatabaseTestCase
1922 */
2023 public static function setUpBeforeClass (): void
2124 {
22- $ manager = static :: getDatabaseManager ();
25+ parent :: setUpBeforeClass ();
2326
24- $ connection = $ manager ->getConnection ();
25- $ manager ->dropDatabase ();
26- $ manager ->createDatabase ();
27- $ connection ->select ($ manager ->getDbName ());
28-
29- static ::$ connection = $ connection ;
27+ if (!static ::$ connection || static ::$ connection ->getName () !== 'pgsql ' ) {
28+ self ::markTestSkipped ('PostgreSQL database not configured. ' );
29+ }
3030 }
3131
3232 /**
Original file line number Diff line number Diff line change 1111use Joomla \Database \Sqlsrv \SqlsrvStatement ;
1212use Joomla \Test \DatabaseTestCase ;
1313
14+ /**
15+ * Test class for Joomla\Database\Sqlsrv\SqlsrvStatement
16+ */
1417class SqlsrvPreparedStatementTest extends DatabaseTestCase
1518{
1619 /**
@@ -20,14 +23,11 @@ class SqlsrvPreparedStatementTest extends DatabaseTestCase
2023 */
2124 public static function setUpBeforeClass (): void
2225 {
23- $ manager = static :: getDatabaseManager ();
26+ parent :: setUpBeforeClass ();
2427
25- $ connection = $ manager ->getConnection ();
26- $ manager ->dropDatabase ();
27- $ manager ->createDatabase ();
28- $ connection ->select ($ manager ->getDbName ());
29-
30- static ::$ connection = $ connection ;
28+ if (!static ::$ connection || static ::$ connection ->getName () !== 'sqlsrv ' ) {
29+ self ::markTestSkipped ('SQL Server database not configured. ' );
30+ }
3131 }
3232
3333 /**
@@ -49,7 +49,7 @@ protected function setUp(): void
4949 } catch (ExecutionFailureException $ exception ) {
5050 $ this ->markTestSkipped (
5151 \sprintf (
52- 'Could not load MS SQL Server database: %s ' ,
52+ 'Could not load SQL Server database: %s ' ,
5353 $ exception ->getMessage ()
5454 )
5555 );
Original file line number Diff line number Diff line change 44 * @license GNU General Public License version 2 or later; see LICENSE
55 */
66
7- namespace Joomla \Database \Tests \Sqlqrv ;
7+ namespace Joomla \Database \Tests \Sqlsrv ;
88
99use Joomla \Database \DatabaseDriver ;
1010use Joomla \Database \Exception \ExecutionFailureException ;
You can’t perform that action at this time.
0 commit comments