diff --git a/tests/DBTest.php b/tests/DBTest.php new file mode 100644 index 0000000..58db8b1 --- /dev/null +++ b/tests/DBTest.php @@ -0,0 +1,20 @@ +createDatabase("test_foobar"); + } + + /** + * @expectedException RuntimeException + */ + public function testCreateException() + { + $client = new Client; + return $client->createDatabase("test_foobar"); + } +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..de33d98 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,10 @@ +getDatabases() as $db) { + if (preg_match("/^test_/", $db->getName())) { + $db->drop(); + } +}