X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fgabordemooij%2Fredbean%2Ftesting%2FRedUNIT.php;fp=vendor%2Fgabordemooij%2Fredbean%2Ftesting%2FRedUNIT.php;h=0000000000000000000000000000000000000000;hp=9f3f9a33b9e50a2592265d1c263a0c45e58ea368;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/gabordemooij/redbean/testing/RedUNIT.php b/vendor/gabordemooij/redbean/testing/RedUNIT.php deleted file mode 100644 index 9f3f9a33b..000000000 --- a/vendor/gabordemooij/redbean/testing/RedUNIT.php +++ /dev/null @@ -1,153 +0,0 @@ -getMethods( \ReflectionMethod::IS_PUBLIC ) as $method ) { - // Skip methods inherited from parent class - if ( $method->class != $class->getName() ) continue; - if ( in_array( $method->name, $skip ) ) continue; - $classname = str_replace( $class->getParentClass()->getName().'_', '', $method->class ); - printtext( "\n\t" . $classname."->".$method->name." [".$method->class."->".$method->name."]" . " \n\t" ); - $call = $method->name; - $this->$call(); - try { - R::nuke(); - } catch( \PDOException $e ) { - // Some tests use a broken database on purpose, so an exception is ok - } - } - } - - /** - * Clean-up method, to be invoked after running the test. - * This is an empty implementation, it does nothing. However this method - * should be overridden by tests that require clean-up. - * - * @return void - */ - public function cleanUp() - { - } - - /** - * Sets the current driver. - * This method is called by a test controller, runner or manager - * to activate the mode associated with the specified driver - * identifier. This mechanism allows a test to run slightly different - * in the context of another driver, for instance SQLite might not need - * some tests, or MySQL might need some additional tests etc... - * - * @param string $driver the driver identifier - * - * @return void - */ - public function setCurrentDriver( $driver ) - { - $this->currentlyActiveDriverID = $driver; - } - - /** - * Sets the round number. - * Each test can have a varying number of flavors. - * A test flavor is 'that same test' but for a different driver. - * Each 'run on a specific driver' is called a round. - * Some tests might want to know what the current round is. - * This method can be used to set the current round number. - * - * @param integer $roundNumber round, the current round number - * - * @return void - */ - public function setRound( $roundNumber ) - { - $this->round = (int) $roundNumber; - } - - /** - * Returns the current round number. - * The current round number indicates how many times - * this test has been applied (to various drivers). - * - * @return integer - */ - public function getRound() - { - return $this->round; - } - - /** - * Detects whether the current round is the first one. - * If the current round is indeed the first round, this method - * will return boolean TRUE, otherwise it will return FALSE. Note that - * the rounds are 0-based, so - if the current round equals 0, this - * method will return TRUE. - * - * @return boolean - */ - public function isFirstRound() - { - return ( $this->round === 0 ); - } -}