diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 81bbe8ec..6d76aac3 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -44,6 +44,11 @@ jobs: options: --name=mssql --health-cmd="/opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -C -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 steps: + - name: Install ODBC driver. + run: | + sudo curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list + sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 + - name: Checkout. uses: actions/checkout@v3 diff --git a/tests/Support/TestTrait.php b/tests/Support/TestTrait.php index a5df7a1c..2d1dbe97 100644 --- a/tests/Support/TestTrait.php +++ b/tests/Support/TestTrait.php @@ -38,7 +38,7 @@ protected function getConnection(bool $fixture = false): PdoConnectionInterface protected static function getDb(): PdoConnectionInterface { $dsn = (new Dsn('sqlsrv', 'localhost', 'yiitest'))->asString(); - $dsn .= ';TrustServerCertificate=yes'; + $dsn .= ';Encrypt=no'; return new Connection( new Driver($dsn, 'SA', 'YourStrong!Passw0rd'), @@ -50,7 +50,7 @@ protected function getDsn(): string { if ($this->dsn === '') { $this->dsn = (new Dsn('sqlsrv', 'localhost', 'yiitest'))->asString(); - $this->dsn .= ';TrustServerCertificate=yes'; + $this->dsn .= ';Encrypt=no'; } return $this->dsn;