--TEST--
libvirt_domain_shutdown
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
	echo "# libvirt_connect\n";
	var_dump($conn = libvirt_connect('test:///default',  false));
	if (!is_resource($conn))
		die('Connection to default hypervisor failed');

	$xml = file_get_contents(__DIR__.'/example-no-disk-and-media.xml');

	echo "# libvirt_domain_create_xml\n";
	var_dump($res = libvirt_domain_create_xml($conn, $xml));
	if (!is_resource($res))
		die('Domain definition failed with error: '.libvirt_get_last_error());

	echo "# libvirt_domain_shutdown\n";
	var_dump($ret = libvirt_domain_shutdown($res));
	if (!$ret) {
		die('Domain shutdown failed with error: '.libvirt_get_last_error());
	}

	unset($res);
	unset($conn);

?>
Done
--EXPECTF--
# libvirt_connect
resource(%d) of type (Libvirt connection)
# libvirt_domain_create_xml
resource(%d) of type (Libvirt domain)
# libvirt_domain_shutdown
bool(true)
Done
