Browse Source

Unskip most of the SQLServer tests.

We can now safely run these tests in all environments, now that the
SqlServer driver does not directly reference extension specific
constants.
Mark Story 10 years ago
parent
commit
9d685fef04

+ 2 - 1
tests/TestCase/Database/Driver/SqlserverTest.php

@@ -35,7 +35,7 @@ class SqlserverTest extends TestCase
     public function setUp()
     {
         parent::setUp();
-        $this->skipUnless(defined('PDO::SQLSRV_ENCODING_UTF8'), 'SQL Server extension not present');
+        $this->missingExtension = !defined('PDO::SQLSRV_ENCODING_UTF8');
     }
 
     /**
@@ -45,6 +45,7 @@ class SqlserverTest extends TestCase
      */
     public function testConnectionConfigCustom()
     {
+        $this->skipIf($this->missingExtension, 'pdo_sqlsrv is not installed.');
         $config = [
             'persistent' => false,
             'host' => 'foo',

+ 0 - 12
tests/TestCase/Database/Schema/SqlserverSchemaTest.php

@@ -26,18 +26,6 @@ use Cake\TestSuite\TestCase;
  */
 class SqlserverSchemaTest extends TestCase
 {
-
-    /**
-     * Set up
-     *
-     * @return void
-     */
-    public function setUp()
-    {
-        parent::setUp();
-        $this->skipUnless(defined('PDO::SQLSRV_ENCODING_UTF8'), 'SQL Server extension not present');
-    }
-
     /**
      * Helper method for skipping tests that need a real connection.
      *