mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-14 00:44:23 -05:00
Begin Refactor
This commit is contained in:
32
vendor/gabordemooij/redbean/testing/RedUNIT/Pretest.php
vendored
Normal file
32
vendor/gabordemooij/redbean/testing/RedUNIT/Pretest.php
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Pretest
|
||||
*
|
||||
* These tests will run before the configuration takes place
|
||||
* in the unit test suite (mostly error handling tests).
|
||||
*
|
||||
* @file RedUNIT/Pretest.php
|
||||
* @desc Test scripts that run before configuration
|
||||
* @author Gabor de Mooij and the RedBeanPHP Community
|
||||
* @license New BSD/GPLv2
|
||||
*
|
||||
* (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community.
|
||||
* This source file is subject to the New BSD/GPLv2 License that is bundled
|
||||
* with this source code in the file license.txt.
|
||||
*/
|
||||
|
||||
testpack('Running pre-tests. (before config).');
|
||||
|
||||
try {
|
||||
R::debug( TRUE );
|
||||
fail();
|
||||
} catch( Exception $e ) {
|
||||
pass();
|
||||
}
|
||||
|
||||
asrt( R::testConnection(), FALSE);
|
||||
|
||||
R::addDatabase( 'broken', 'mysql:host=nowhere', 'defunct', 'void' );
|
||||
R::selectDatabase( 'broken' );
|
||||
asrt( R::testConnection(), FALSE );
|
Reference in New Issue
Block a user