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

PHP Success类代码示例

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

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



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

示例1: testStartStop

 public function testStartStop()
 {
     $test = new Success();
     $test->run($this->result);
     $this->assertEquals(1, $this->startCount);
     $this->assertEquals(1, $this->endCount);
 }
开发者ID:TheTypoMaster,项目名称:SPHERE-Framework,代码行数:7,代码来源:TestListenerTest.php


示例2: testEndEventsAreCounted

 /**
  * @covers PHPUnit_Framework_TestResult
  */
 public function testEndEventsAreCounted()
 {
     $this->result = new PHPUnit_Framework_TestResult();
     $listener = new BaseTestListenerSample();
     $this->result->addListener($listener);
     $test = new Success();
     $test->run($this->result);
     $this->assertEquals(1, $listener->endCount);
 }
开发者ID:Ceciceciceci,项目名称:MySJSU-Class-Registration,代码行数:12,代码来源:BaseTestListenerTest.php


示例3: testSuccess

 public function testSuccess()
 {
     $test = new Success();
     $result = $test->run();
     $this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_PASSED, $test->getStatus());
     $this->assertEquals(0, $result->errorCount());
     $this->assertEquals(0, $result->failureCount());
     $this->assertEquals(0, $result->skippedCount());
     $this->assertEquals(1, count($result));
 }
开发者ID:nicolas-grekas,项目名称:phpunit,代码行数:10,代码来源:TestCaseTest.php


示例4: postLogin

 public function postLogin()
 {
     $email = Input::get('email');
     $password = Input::get('password');
     if (Auth::attempt(array('email' => $email, 'password' => $password))) {
         Success::flash('successMessage', 'Welcome to the blog, user!');
         return Redirect::intended('/posts');
     } else {
         // login failed, go back to the login screen
         Session::flash('error message', 'Login failed.  Your username and/or password don\'t match.');
         return Redirect::back()->withInput();
     }
 }
开发者ID:ryanski,项目名称:blog.dev,代码行数:13,代码来源:HomeController.php


示例5: toArray

 public function toArray()
 {
     $r = new Success();
     $r->set("limit", $this->limit);
     $r->set("records", $this->records);
     $r->set("total", $this->total);
     $r->set("start", $this->start);
     return $r->toArray();
 }
开发者ID:Borales,项目名称:HatimeriaExtJSBundle,代码行数:9,代码来源:Records.php


示例6: allyReComp

 function allyReComp(&$hako)
 {
     $rt1 = $this->allyDelete($hako);
     // 盟主不在により同盟データから削除
     $rt2 = $this->allyMemberDel($hako);
     // 放棄、無人島を同盟データから削除
     $rt3 = $this->allyPopComp($hako);
     // 人口の再集計(ターン処理に組み込んでいないため)
     if ($rt1 || $rt2 || $rt3) {
         // データ書き出し
         AllyUtil::allyOccupy($hako);
         AllyUtil::allySort($hako);
         $hako->writeAllyFile();
         // メッセージ出力
         Success::allyDataUp();
         return 1;
     }
     return 0;
 }
开发者ID:hiro0218,项目名称:hakoniwa,代码行数:19,代码来源:hako-ally.php


示例7: update

 public function update(Server $server) : Promise
 {
     switch ($this->state = $server->state()) {
         case Server::STARTING:
             $result = $this->application->onStart($this->proxy);
             if ($result instanceof \Generator) {
                 return resolve($result);
             }
             break;
         case Server::STARTED:
             $f = (new \ReflectionClass($this))->getMethod("timeout")->getClosure($this);
             $this->timeoutWatcher = \Amp\repeat($f, 1000);
             break;
         case Server::STOPPING:
             $result = $this->application->onStop();
             if ($result instanceof \Generator) {
                 $promise = resolve($result);
             } elseif ($result instanceof Promise) {
                 $promise = $result;
             } else {
                 $promise = new Success();
             }
             $promise->when(function () {
                 $code = Code::GOING_AWAY;
                 $reason = "Server shutting down!";
                 foreach ($this->clients as $client) {
                     $this->close($client->id, $code, $reason);
                 }
             });
             \Amp\cancel($this->timeoutWatcher);
             $this->timeoutWatcher = null;
             return $promise;
         case Server::STOPPED:
             $promises = [];
             // we are not going to wait for a proper self::OP_CLOSE answer (because else we'd need to timeout for 3 seconds, not worth it), but we will ensure to at least *have written* it
             foreach ($this->clients as $client) {
                 // only if we couldn't successfully send it in STOPPING
                 $code = Code::GOING_AWAY;
                 $reason = "Server shutting down!";
                 $result = $this->doClose($client, $code, $reason);
                 if ($result instanceof \Generator) {
                     $promise[] = resolve($result);
                 }
                 if (!empty($client->writeDeferredControlQueue)) {
                     $promise = end($client->writeDeferredControlQueue)->promise();
                     if ($promise) {
                         $promises[] = $promise;
                     }
                 }
             }
             $promise = any($promises);
             $promise->when(function () {
                 foreach ($this->clients as $client) {
                     $this->unloadClient($client);
                 }
             });
             return $promise;
     }
     return new Success();
 }
开发者ID:staabm,项目名称:aerys,代码行数:60,代码来源:Rfc6455Endpoint.php


示例8: commandMain

 function commandMain($hako, $data)
 {
     global $init;
     $id = $data['ISLANDID'];
     $num = $hako->idToNumber[$id];
     $island = $hako->islands[$num];
     $name = $island['name'];
     // パスワード
     if (!Util::checkPassword($island['password'], $data['PASSWORD'])) {
         // password間違い
         HakoError::wrongPassword();
         return;
     }
     // モードで分岐
     $command = $island['command'];
     $comary = explode(" ", $data['COMARY']);
     for ($i = 0; $i < $init->commandMax; $i++) {
         $pos = $i * 5;
         $kind = $comary[$pos];
         $x = $comary[$pos + 1];
         $y = $comary[$pos + 2];
         $arg = $comary[$pos + 3];
         $target = $comary[$pos + 4];
         // コマンド登録
         if ($kind == 0) {
             $kind = $init->comDoNothing;
         }
         $command[$i] = array('kind' => $kind, 'x' => $x, 'y' => $y, 'arg' => $arg, 'target' => $target);
     }
     Success::commandAdd();
     // データの書き出し
     $island['command'] = $command;
     $hako->islands[$num] = $island;
     $hako->writeIslandsFile($island['id']);
     // owner modeへ
     $html = new HtmlMapJS();
     $html->owner($hako, $data);
 }
开发者ID:hiro0218,项目名称:hakoniwa,代码行数:38,代码来源:hako-make.php


示例9: testExecute

 public function testExecute()
 {
     $this->session->expects($this->once())->method('getLastOrderId')->willReturn(1);
     $this->session->expects($this->once())->method('setLastOrderId')->with(null);
     $title = $this->getMockBuilder(\Magento\Framework\View\Page\Title::class)->disableOriginalConstructor()->getMock();
     $title->expects($this->once())->method('set')->with(__('Thank you for your payment!'));
     $config = $this->getMockBuilder(\Magento\Framework\View\Page\Config::class)->disableOriginalConstructor()->getMock();
     $config->expects($this->once())->method('getTitle')->willReturn($title);
     $page = $this->getMockBuilder(\Magento\Framework\View\Result\Page::class)->disableOriginalConstructor()->getMock();
     $page->expects($this->once())->method('getConfig')->willReturn($config);
     $this->resultPageFactory->expects($this->once())->method('create')->willReturn($page);
     $this->assertEquals($page, $this->controller->execute());
 }
开发者ID:tozwierz,项目名称:magento2_payupl,代码行数:13,代码来源:SuccessTest.php


示例10: __construct

 /**
  * Construct regular expression result.
  *
  * @param array $matches
  *            Matches as returned by {@see preg_matches}.
  * @param int[] $pos
  *            Result position.
  * @param array $nextInput
  *            Remaining input.
  * @param int[] $nextPos
  *            Next position.
  */
 public function __construct($matches, array $pos, array $nextInput, array $nextPos)
 {
     parent::__construct($matches[0][0], $pos, $nextInput, $nextPos);
     $this->matches = $matches;
 }
开发者ID:nielssp,项目名称:parco,代码行数:17,代码来源:Match.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP SucomUtil类代码示例发布时间:2022-05-23
下一篇:
PHP Subsite类代码示例发布时间: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