本文整理汇总了PHP中RedBeanPHP\R::nuke方法的典型用法代码示例。如果您正苦于以下问题:PHP R::nuke方法的具体用法?PHP R::nuke怎么用?PHP R::nuke使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RedBeanPHP\R
的用法示例。
在下文中一共展示了R::nuke方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
R::nuke();
$this->posts = new Posts(new ContainerMock());
}
示例2: setUp
public function setUp()
{
R::nuke();
$this->details = new Details(new ContainerMock());
}
示例3: populate
/**
*/
function populate()
{
// do not execute this function
return;
R::freeze(false);
R::nuke();
$quiz = R::xdispense(QUIZ);
$quiz->theme = 'starwars';
$quiz->nextaction = '/';
R::store($quiz);
$question = R::xdispense(QUESTION);
$question->title = "Which Star Wars Character Are You?!";
R::store($question);
$question->{QUIZ} = $quiz;
R::store($question);
$answer = R::xdispense(ANSWER);
$answer->title = 'Han Solo';
$answer->message = "You have a strong and determined personality, but beneath your tough exterior you have a loving heart and an inner bravery that will help you through the tough times. You learn from your mistakes and always stay true to yourself!";
$answer->sharemessage = "I have a strong and determined personality, but beneath my tough exterior I have a loving heart and an inner bravery that helps me through the tough times. I learn from my mistakes and always stay true to myself! Who would you be?";
$answer->image = 'A';
$answer->{QUIZ} = $quiz;
$answer->{QUESTION} = $question;
R::store($answer);
$answer = R::xdispense(ANSWER);
$answer->title = 'Luke Skywalker';
$answer->message = "You're courageous, eager for adventure and an all-round hero. Sometimes you find it hard to control your emotions, but you always have the happiness and wellbeing of others at heart!";
$answer->sharemessage = "I'm courageous, eager for adventure and an all-round hero. Sometimes I find it hard to control my emotions, but I always have the happiness and wellbeing of others at heart! Who would you be?";
$answer->image = 'B';
$answer->{QUIZ} = $quiz;
$answer->{QUESTION} = $question;
R::store($answer);
$answer = R::xdispense(ANSWER);
$answer->title = 'Princess Leia';
$answer->image = 'C';
$answer->message = "You're level-headed, courageous, and with a sharp-tongued wit surpassed only by your beauty. You've been through some tough times but always come out stronger in the end!";
$answer->sharemessage = "I'm level-headed, courageous, and with a sharp-tongued wit surpassed only by my beauty. I've been through some tough times but always come out stronger in the end! Who would you be?";
$answer->{QUIZ} = $quiz;
$answer->{QUESTION} = $question;
R::store($answer);
$answer = R::xdispense(ANSWER);
$answer->title = 'Chewbacca';
$answer->image = 'D';
$answer->message = "You may look tough, and even scary to some people, but deep down you're a big softie. You're loyal, affectionate and humble - but if you think something isn't fair you're not afraid to say so! ";
$answer->sharemessage = "I may look tough, and even scary to some people, but deep down I'm a big softie. I'm loyal, affectionate and humble - but if I think something isn't fair I'm not afraid to say so! Who would you be?";
$answer->{QUIZ} = $quiz;
$answer->{QUESTION} = $question;
R::store($answer);
$answer = R::xdispense(ANSWER);
$answer->title = 'Finn';
$answer->image = 'E';
$answer->message = "Despite what life has thrown at you, you have a good heart and true empathy for other people. You are brave, intelligent and with the strength to face down whatever life throws at you!";
$answer->sharemessage = "Despite what life has thrown at me, I have a good heart and true empathy for other people. I am brave, intelligent and with the strength to face down whatever life throws at me! Who would you be?";
$answer->{QUIZ} = $quiz;
$answer->{QUESTION} = $question;
R::store($answer);
$answer = R::xdispense(ANSWER);
$answer->title = 'Rey';
$answer->image = 'F';
$answer->message = "You have a heart full of generosity and a desire to help others, often putting their needs before your own. You have a great imagination that sets you apart from the majority of others!";
$answer->sharemessage = "I have a heart full of generosity and a desire to help others, often putting their needs before my own. I have a great imagination that sets me apart from the majority of others! Who would you be?";
$answer->{QUIZ} = $quiz;
$answer->{QUESTION} = $question;
R::store($answer);
$quiz_user = array('createdate' => '2016-02-08 19:20:37', 'name' => 'Matteo Monti Matteo Monti Matteo Monti Matteo Monti Matteo Monti', 'email' => 'mmonti@gmail.commmonti@gmail.commmonti@gmail.commmonti@gmail.commmonti@', 'gender' => 'maleorfemale', 'ip' => '151.237.238.110', 'fbid' => '1a01544915asdasdasdasdasdasd51609838e16', 'lastupdate' => '2016-02-08 19:20:37', 'city' => 'Leccooranotherlocationwhatever', 'country' => 'Leccooranotherlocationwhatever', 'latitude' => '45.85a', 'longitude' => '9.38333a');
$user = R::xdispense(USER);
$user->import($quiz_user);
R::store($user);
R::wipe(USER);
R::freeze(true);
return $quiz;
}
示例4: Testify
<?php
define('testing', true);
require_once '../modules/index.php';
use Testify\Testify;
use Enpowi\App;
use RedBeanPHP\R;
$tf = new Testify(App::$config->siteName . ' Test Suite');
$tf->beforeEach(function () {
R::nuke();
});
$di = new RecursiveDirectoryIterator('server', RecursiveDirectoryIterator::SKIP_DOTS);
foreach (new RecursiveIteratorIterator($di) as $filename => $file) {
require $filename;
}
$tf();
示例5: setUp
public function setUp()
{
R::nuke();
Auth::CreateInitialAdmin(new ContainerMock());
$this->admin = new Admin(new ContainerMock());
}
示例6: setUp
public function setUp()
{
R::nuke();
$this->auth = new Auth(new ContainerMock());
}