• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP verify函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中verify函数的典型用法代码示例。如果您正苦于以下问题:PHP verify函数的具体用法?PHP verify怎么用?PHP verify使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了verify函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: testPHPSpecCommand

 public function testPHPSpecCommand()
 {
     $task = $this->taskPhpspec('phpspec')->stopOnFail()->noCodeGeneration()->quiet()->verbose('vv')->noAnsi()->noInteraction()->format('pretty');
     verify($task->getCommand())->equals('phpspec run --stop-on-failure --no-code-generation --quiet -vv --no-ansi --no-interaction --format pretty');
     $task->run();
     $this->phpspec->verifyInvoked('executeCommand', ['phpspec run --stop-on-failure --no-code-generation --quiet -vv --no-ansi --no-interaction --format pretty']);
 }
开发者ID:stefanhuber,项目名称:Robo,代码行数:7,代码来源:PhpspecTest.php


示例2: testConvertCurrency

 public function testConvertCurrency(UnitTester $I)
 {
     $exchangeRate = new \Zidisha\Currency\ExchangeRate();
     $exchangeRate->setRate(80)->setCurrencyCode(Currency::CODE_KES);
     // convert to USD
     $money = Money::create('160', Currency::CODE_KES);
     $moneyUSD = Money::create('2.0', Currency::CODE_USD);
     verify($this->currencyService->convertToUSD($money, $exchangeRate))->equals($moneyUSD);
     // convert from USD
     $money = Money::create('240', Currency::CODE_KES);
     $moneyUSD = Money::create('3.0', Currency::CODE_USD);
     verify($this->currencyService->convertFromUSD($moneyUSD, Currency::create(Currency::CODE_KES), $exchangeRate))->equals($money);
     $failed = false;
     try {
         $money = Money::create('160', Currency::CODE_XOF);
         $this->currencyService->convertToUSD($money, $exchangeRate);
     } catch (\Zidisha\Currency\Exception\InvalidCurrencyExchangeException $e) {
         $failed = true;
     }
     verify($failed)->true();
     $failed = false;
     try {
         $this->currencyService->convertFromUSD($moneyUSD, Currency::create(Currency::CODE_XOF), $exchangeRate);
     } catch (\Zidisha\Currency\Exception\InvalidCurrencyExchangeException $e) {
         $failed = true;
     }
     verify($failed)->true();
 }
开发者ID:Junyue,项目名称:zidisha2,代码行数:28,代码来源:CurrencyServiceCest.php


示例3: testPHPUnitCommand

 public function testPHPUnitCommand()
 {
     $task = $this->taskPHPUnit('phpunit')->bootstrap('bootstrap.php')->filter('Model')->group('important')->xml('result.xml')->debug();
     verify($task->getCommand())->equals('phpunit --bootstrap bootstrap.php --filter Model --group important --log-junit result.xml --debug');
     $task->run();
     $this->phpunit->verifyInvoked('executeCommand', ['phpunit --bootstrap bootstrap.php --filter Model --group important --log-junit result.xml --debug']);
 }
开发者ID:stefanhuber,项目名称:Robo,代码行数:7,代码来源:PHPUnitTest.php


示例4: testCommands

 /**
  * Do the Artisan commands fire?
  */
 public function testCommands()
 {
     $self = $this;
     $this->prepareSpecify();
     $this->specify('Boots', function () use($self) {
         $target = $self->getProvider(['package']);
         $target->shouldReceive('package');
         $target->boot();
     });
     $this->prepareSpecify();
     $this->specify('Identifies provisions', function () use($self) {
         $target = $self->getProvider();
         verify($target->provides())->notEmpty();
     });
     $this->prepareSpecify();
     $this->specify('Binds to application', function () use($self) {
         App::shouldReceive('bind')->with('/^toolbox\\.commands\\./', Mockery::on(function ($closure) {
             $command = $closure();
             verify_that('is a command', is_a($command, 'Illuminate\\Console\\Command'));
             return true;
         }));
         Event::shouldReceive('listen')->with('toolbox.build', Mockery::on(function ($closure) {
             $app = Mockery::mock('Illuminate\\Console\\Application[call]');
             $app->shouldReceive('call');
             $command = $closure($app);
             return true;
         }));
         $target = $self->getProvider(['commands']);
         $target->shouldReceive('commands')->with(Mockery::type('array'));
         $target->register();
     });
 }
开发者ID:impleri,项目名称:laravel-toolbox,代码行数:35,代码来源:ProviderTest.php


示例5: nav

function nav()
{
    unset($_SESSION['index_class']);
    unset($_SESSION['editmix_class']);
    unset($_SESSION['validate_class']);
    unset($_SESSION['makemix_class']);
    unset($_SESSION['mwbedocs_class']);
    unset($_SESSION['upfiles_class']);
    if ($_SESSION['action'] == "index") {
        index();
    } elseif ($_SESSION['action'] == "makemix") {
        makemix();
    } elseif ($_SESSION['action'] == "upfiles") {
        upfiles();
    } elseif ($_SESSION['action'] == "verify") {
        verify();
    } elseif ($_SESSION['action'] == "validate") {
        validate();
    } elseif ($_SESSION['action'] == "editmix") {
        editmix();
    } elseif ($_SESSION['action'] == "mwbedocs") {
        mwbedocs();
    } elseif ($_SESSION['action'] == "delmix") {
        delmix();
    } else {
        index();
    }
}
开发者ID:romeosidvicious,项目名称:MixWidget-Back-End,代码行数:28,代码来源:functions.php


示例6: testLogin

 public function testLogin()
 {
     $this->form = new LoginForm();
     $this->specify('should not allow logging in blocked users', function () {
         $user = $this->getFixture('user')->getModel('blocked');
         $this->form->setAttributes(['login' => $user->email, 'password' => 'qwerty']);
         verify($this->form->validate())->false();
         verify($this->form->getErrors('login'))->contains('Your account has been blocked');
     });
     $this->specify('should not allow logging in unconfirmed users', function () {
         \Yii::$app->getModule('user')->enableConfirmation = true;
         \Yii::$app->getModule('user')->enableUnconfirmedLogin = false;
         $user = $this->getFixture('user')->getModel('user');
         $this->form->setAttributes(['login' => $user->email, 'password' => 'qwerty']);
         verify($this->form->validate())->true();
         $user = $this->getFixture('user')->getModel('unconfirmed');
         $this->form->setAttributes(['login' => $user->email, 'password' => 'unconfirmed']);
         verify($this->form->validate())->false();
         \Yii::$app->getModule('user')->enableUnconfirmedLogin = true;
         verify($this->form->validate())->true();
     });
     $this->specify('should log the user in with correct credentials', function () {
         $user = $this->getFixture('user')->getModel('user');
         $this->form->setAttributes(['login' => $user->email, 'password' => 'wrong']);
         verify($this->form->validate())->false();
         $this->form->setAttributes(['login' => $user->email, 'password' => 'qwerty']);
         verify($this->form->validate())->true();
     });
 }
开发者ID:ilyar,项目名称:dektrium-yii2-user,代码行数:29,代码来源:LoginFormTest.php


示例7: template_redirect

 /**
  * Output the POS template
  */
 public function template_redirect()
 {
     // check is pos
     if (!is_pos('template')) {
         return;
     }
     // check auth
     if (!is_user_logged_in()) {
         add_filter('login_url', array($this, 'login_url'));
         auth_redirect();
     }
     //check store table
     if (verify() == -1) {
         wp_die(__('You are not listed as a store employee or administrator.'));
     }
     // check privileges
     if (!current_user_can('access_woocommerce_pos')) {
         /* translators: wordpress */
         wp_die(__('You do not have sufficient permissions to access this page.'));
     }
     // disable cache plugins
     $this->no_cache();
     // last chance before template is rendered
     do_action('woocommerce_pos_template_redirect');
     // add head & footer actions
     add_action('woocommerce_pos_head', array($this, 'head'));
     add_action('woocommerce_pos_footer', array($this, 'footer'));
     // now show the page
     include 'views/template.php';
     exit;
 }
开发者ID:jimmybupt,项目名称:woocommerce-pos,代码行数:34,代码来源:class-wc-pos-template.php


示例8: testProcessProlog

 public function testProcessProlog()
 {
     $I = $this->tester;
     $this->tester->wantToTest("processing the prolog and importing the file into the database");
     $this->import->setCsvReader($this->import->file);
     $this->import->processProlog();
     $prolog = $this->import->prolog;
     $this->assertEquals(14, count($prolog['columns']), "There are the correct number of columns");
     $this->assertEquals(6, count($prolog['prefix']), "There are the correct number of prefix entries");
     $this->assertEquals(10, count($prolog['meta']), "There are the correct number of meta entries");
     $this->import->getDataColumnIds();
     $this->import->processData();
     $results = $this->import->results['success'];
     verify(
       "There were 8 rows processed",
       count($results['rows'])
     )->equals(12);
     $this->import->processParents();
     $I->seeRecordCountInDatabaseTable("SchemaPropertyElement", 138);
     $I->seeRecordCountInDatabaseTable("SchemaProperty", 12);
     //prolog namespace entries are readable
     //prolog headers are actually in row 1
     //prolog headers not in row 1 produce fatal error (logged)
     //prolog entries can be matched to database (column uri matched to profile id)
     //prolog entries that can't be matched produce fatal error (logged)
 } //
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:26,代码来源:importTest.php


示例9: login

 public function login()
 {
     check_if_already_logged_in();
     $data['page'] = "login";
     $data['newline'] = "<br/>";
     if (isset($_POST['btnLogin'])) {
         $username = $_POST["username"];
         $password = $_POST["password"];
         if ($user_info = $this->Users_model->find($username)) {
             $user_data = $this->Users_model->find_info($user_info['id']);
             if (verify($password, $user_info["password"], $user_info["salt"])) {
                 $v = $this->Users_model->validity($user_info['id']);
                 $newdata = array('id' => $user_info['id'], 'username' => $username, 'type' => $user_info['type'], 'validity' => $v['validity'], 'user_info' => $user_data);
                 $this->session->set_userdata($newdata);
                 header('Location: home');
             } else {
                 echo "false";
             }
         } else {
             echo "Check your password or username";
         }
     }
     $this->load->view('templates/header');
     $this->load->view('users/login', $data);
     $this->load->view('templates/footer');
 }
开发者ID:aldsdelram,项目名称:PUPNLPWebsite,代码行数:26,代码来源:Users.php


示例10: toExecLsCommand

 public function toExecLsCommand(CliGuy $I)
 {
     $command = strncasecmp(PHP_OS, 'WIN', 3) == 0 ? 'dir' : 'ls';
     $res = $I->taskExec($command)->run();
     verify($res->getMessage())->contains('src');
     verify($res->getMessage())->contains('codeception.yml');
 }
开发者ID:zondor,项目名称:Robo,代码行数:7,代码来源:ExecCest.php


示例11: testComposerDumpAutoloadCommand

 public function testComposerDumpAutoloadCommand()
 {
     verify($this->taskComposerDumpAutoload('composer')->getCommand())->equals('composer dump-autoload');
     verify($this->taskComposerDumpAutoload('composer')->noDev()->getCommand())->equals('composer dump-autoload --no-dev');
     verify($this->taskComposerDumpAutoload('composer')->optimize()->getCommand())->equals('composer dump-autoload --optimize');
     verify($this->taskComposerDumpAutoload('composer')->optimize()->noDev()->getCommand())->equals('composer dump-autoload --optimize --no-dev');
 }
开发者ID:stefanhuber,项目名称:Robo,代码行数:7,代码来源:ComposerTest.php


示例12: testWorkflowCached

 public function testWorkflowCached()
 {
     $this->factory->addWorkflowDefinition('wid', ['initialStatusId' => 'A', 'status' => ['A']]);
     $this->specify('workflow are loaded once', function () {
         verify('workflow instances are the same', spl_object_hash($this->factory->getWorkflow('wid', null)))->equals(spl_object_hash($this->factory->getWorkflow('wid', null)));
     });
 }
开发者ID:fproject,项目名称:workflowii,代码行数:7,代码来源:WorkflowTest.php


示例13: testAtoumCommand

 public function testAtoumCommand()
 {
     $task = (new \Robo\Task\Testing\Atoum('atoum'))->bootstrap('bootstrap.php')->tags("needDb")->lightReport()->tap()->bootstrap('tests/bootstrap.php')->configFile("config/dev.php")->debug()->files(array("path/to/file1.php", "path/to/file2.php"))->directories("tests/units");
     verify($task->getCommand())->equals('atoum --bootstrap bootstrap.php --tags needDb --use-light-report --use-tap-report --bootstrap tests/bootstrap.php -c config/dev.php --debug --f path/to/file1.php --f path/to/file2.php --directories tests/units');
     $task->run();
     $this->atoum->verifyInvoked('executeCommand', ['atoum --bootstrap bootstrap.php --tags needDb --use-light-report --use-tap-report --bootstrap tests/bootstrap.php -c config/dev.php --debug --f path/to/file1.php --f path/to/file2.php --directories tests/units']);
 }
开发者ID:jjok,项目名称:Robo,代码行数:7,代码来源:AtoumTest.php


示例14: testParallelExec

 public function testParallelExec()
 {
     $result = $this->taskParallelExec()->process('ls 1')->process('ls 2')->process('ls 3')->run();
     $this->process->verifyInvokedMultipleTimes('start', 3);
     verify($result->getExitCode())->equals(0);
     $this->guy->seeInOutput("3 processes ended in 0.00 s");
 }
开发者ID:sliver,项目名称:Robo,代码行数:7,代码来源:ParallelExecTest.php


示例15: testSemver

 public function testSemver()
 {
     $semver = test::double('Robo\\Task\\SemVerTask', ['dump' => null]);
     $res = $this->taskSemVer()->increment('major')->prerelease('RC')->increment('patch')->run();
     verify($res->getMessage())->equals('v1.0.1-RC.1');
     $semver->verifyInvoked('dump');
 }
开发者ID:sliver,项目名称:Robo,代码行数:7,代码来源:SemVerTest.php


示例16: actionReturn

 public function actionReturn()
 {
     if (verify($_POST) && $_POST['respCode'] == '00') {
         $this->update_order();
     }
     $this->redirect($this->createUrl('site/orders?msg=' . urlencode('订单支付成功,订单号为:' . $_POST['orderId'])));
 }
开发者ID:redtreelchao,项目名称:wander-moon,代码行数:7,代码来源:UnionpayController.php


示例17: parser_should_use_prefetch_count_from_annotation

 /**
  * @tests
  */
 public function parser_should_use_prefetch_count_from_annotation()
 {
     $parser = new Parser(new AnnotationReader());
     $consumer = new ConsumerWithPrefetchCount();
     $consumerMethods = $parser->getConsumerMethods($consumer);
     $consumerMethod = $consumerMethods[0];
     verify($consumerMethod->getPrefetchCount())->equals(100);
 }
开发者ID:rebuy-de,项目名称:amqp-php-consumer,代码行数:11,代码来源:ParserTest.php


示例18: testIsInterfaceImplemented

 public function testIsInterfaceImplemented()
 {
     $leftOperand = M::mock('Lrusev\\Formula\\Operand\\Number', ['getValue' => 5]);
     $rightOperand = M::mock('Lrusev\\Formula\\Operand\\Number', ['getValue' => 15]);
     $operator = new Div($leftOperand, $rightOperand);
     verify("operator implement Lrusev\\Formula\\Operand\\OperandInterface", $operator)->isInstanceOf('Lrusev\\Formula\\Operand\\OperandInterface');
     verify("operator implement Lrusev\\Formula\\Operator\\OperatorInterface", $operator)->isInstanceOf('Lrusev\\Formula\\Operator\\OperatorInterface');
 }
开发者ID:lrusev,项目名称:formula,代码行数:8,代码来源:OperatorDivTest.php


示例19: testLoadWorkflowSuccess2

 public function testLoadWorkflowSuccess2()
 {
     $src = new WorkflowFileSource();
     $src->addWorkflowDefinition('wid', ['initialStatusId' => 'A', 'status' => ['A' => ['label' => 'Entry', 'transition' => 'A,B'], 'B' => ['label' => 'Published', 'transition' => '  A  , B  ']]]);
     verify($src->getStatus('wid/A'))->notNull();
     verify($src->getStatus('wid/B'))->notNull();
     verify(count($src->getTransitions('wid/A')))->equals(2);
 }
开发者ID:raoul2000,项目名称:yii2-workflow,代码行数:8,代码来源:LoadWorkflowTest.php


示例20: Verify

 public function Verify($data)
 {
     if (isset($data['signature'])) {
         return verify($data);
     } else {
         return false;
     }
 }
开发者ID:onlineshine,项目名称:myzf,代码行数:8,代码来源:unionpay.php



注:本文中的verify函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP verifyAccess函数代码示例发布时间:2022-05-23
下一篇:
PHP verifierAction函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap