File: fabric_no_hosts_in_confg.phpt

package info (click to toggle)
php-mysqlnd-ms 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,452 kB
  • ctags: 3,754
  • sloc: ansic: 9,584; php: 4,929; xml: 848; pascal: 12; makefile: 6
file content (31 lines) | stat: -rw-r--r-- 610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
MySQL Fabric: No hosts in config
--SKIPIF--
<?php
require_once(__DIR__.'/../skipif.inc');
_skipif_check_extensions(array("mysqli"));

file_put_contents("fabric_no_hosts_in_confg.json", <<<EOT
{
	"testfabric" : {
		"fabric":{
		}
	}
}
EOT
);
?>
--INI--
mysqlnd_ms.enable=1
mysqlnd_ms.config_file=fabric_no_hosts_in_confg.json
--FILE--
<?php
$c = new mysqli("testfabric", "root", "");
?>
===END===
--CLEAN--
<?php
unlink("fabric_no_hosts_in_confg.json");
?>
--EXPECTF--
Fatal error: mysqli::mysqli(): (mysqlnd_ms) Section [hosts] doesn't exist for host. This is needed for MySQL Fabric in %s on line %d