php-sqlsrv/test/functional/sqlsrv/TC11_Info.phpt

36 lines
610 B
Plaintext
Raw Normal View History

2017-05-04 01:00:31 +02:00
--TEST--
Driver Loading Test
--DESCRIPTION--
Loads the PHP driver to check whether it is operational or not by checking if SQLSRV is enabled in phpinfo()
--ENV--
PHPT_EXEC=true
--FILE--
<?php
require_once('MsCommon.inc');
2017-05-04 01:00:31 +02:00
function info()
2017-05-04 01:00:31 +02:00
{
ob_start();
phpinfo();
$data = ob_get_contents();
ob_clean();
2017-05-04 01:00:31 +02:00
return $data;
}
$testName = "Driver Loading";
startTest($testName);
2017-05-04 01:00:31 +02:00
preg_match('/sqlsrv support.*/', info(), $matches);
var_dump($matches);
2017-05-04 01:00:31 +02:00
endTest($testName);
2017-05-04 01:00:31 +02:00
?>
--EXPECT--
array(1) {
[0]=>
string(25) "sqlsrv support => enabled"
}
Test "Driver Loading" completed successfully.