当前位置: 首页>>代码示例>>PHP>>正文


PHP Phake::atLeast方法代码示例

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


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

示例1: testBuild

 public function testBuild()
 {
     $containerBuilder = \Phake::mock('Symfony\\Component\\DependencyInjection\\ContainerBuilder');
     $bundle = new ModeraRoutingBundle();
     $bundle->build($containerBuilder);
     \Phake::verify($containerBuilder, \Phake::atLeast(2))->addCompilerPass($this->isInstanceOf('Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface'));
 }
开发者ID:modera,项目名称:foundation,代码行数:7,代码来源:ModeraRoutingBundleTest.php

示例2: testConfigureCustomAggregateFactory

 public function testConfigureCustomAggregateFactory()
 {
     $this->fixture->registerAggregateFactory($this->mockAggregateFactory);
     $this->fixture->registerAnnotatedCommandHandler(new MyCommandHandler($this->fixture->getRepository(), $this->fixture->getEventBus()));
     $this->fixture->given([new MyEvent("id1", 1)])->when(new TestCommand("id1"));
     \Phake::verify($this->mockAggregateFactory, \Phake::atLeast(1))->createAggregate(\Phake::equalTo("id1"), \Phake::anyParameters());
 }
开发者ID:peanohan,项目名称:GovernorFramework,代码行数:7,代码来源:GenericFixtureTest.php

示例3: testVerifyAtLeastMismatch

 /**
  * Tests that at least doesn't match
  * @expectedException Phake_Exception_VerificationException
  */
 public function testVerifyAtLeastMismatch()
 {
     $mock = Phake::mock('PhakeTest_MockedClass');
     Phake::verify($mock, Phake::atLeast(1))->foo();
 }
开发者ID:kore,项目名称:Phake,代码行数:9,代码来源:PhakeTest.php

示例4: theAdapterShouldReportTheScenarioWithSteps

 /**
  * @Then /^the Adapter should report the scenario "([^"]*)" with following steps:$/
  */
 public function theAdapterShouldReportTheScenarioWithSteps($scenarioName, PyStringNode $expected_steps)
 {
     Phake::verify($this->_mockedClient, Phake::atLeast(1))->startScenario($scenarioName);
     // some steptext might be more than once in the result array
     $timesOccured = array_count_values($expected_steps->getLines());
     foreach ($expected_steps->getLines() as $steptext) {
         $times_expected = $timesOccured[$steptext];
         Phake::verify($this->_mockedClient, Phake::times($times_expected))->addStepToBuffer($steptext, null);
     }
     $this->_cntScenariosToBeStopped++;
     Phake::verify($this->_mockedClient, Phake::atLeast($this->_cntScenariosToBeStopped))->stopScenario();
 }
开发者ID:shell88,项目名称:bdd_videoannotator_php,代码行数:15,代码来源:BehatAdapterTestContext.php

示例5: test_remote_get_success_existing_user_sets_the_proper_cookies_and_redirects_to_admin

 /**
  * @depends test_remote_get_success_looks_up_user
  */
 public function test_remote_get_success_existing_user_sets_the_proper_cookies_and_redirects_to_admin()
 {
     Phake::when($this->facade)->get_users(Phake::anyParameters())->thenReturn(array(new WP_User(1)));
     $this->client->launchkey_callback();
     Phake::verify($this->facade)->wp_set_auth_cookie(1, false);
     Phake::verify($this->facade)->setcookie('launchkey_access_token', 'OAuth Access Token', $this->timestamp + 86400 * 30, COOKIEPATH, COOKIE_DOMAIN);
     Phake::verify($this->facade)->setcookie('launchkey_refresh_token', 'OAuth Refresh_token', $this->timestamp + 86400 * 30, COOKIEPATH, COOKIE_DOMAIN);
     Phake::verify($this->facade)->setcookie('launchkey_expires', $this->timestamp + $this->expires_in, $this->timestamp + 86400 * 30, COOKIEPATH, COOKIE_DOMAIN);
     Phake::verify($this->facade, Phake::atLeast(1))->admin_url();
     Phake::verify($this->facade)->wp_redirect('admin.url');
 }
开发者ID:aenglander,项目名称:launchkey-wordpress,代码行数:14,代码来源:class-launchkey-wp-oauth-client-launchkey-callback-test.php

示例6: testLogsDebugMessages

 public function testLogsDebugMessages()
 {
     $this->loggingApiService->createWhiteLabelUser(null);
     \Phake::verify($this->logger, \Phake::atLeast(1))->debug(\Phake::anyParameters());
 }
开发者ID:ThemeSurgeon,项目名称:launchkey-php,代码行数:5,代码来源:GuzzleApiServiceCreateWhiteLabelUserTest.php

示例7: test_enqueue_wizard_script_localizes_script_after_enqueueing_scripts

 public function test_enqueue_wizard_script_localizes_script_after_enqueueing_scripts()
 {
     $this->wizard->enqueue_scripts();
     Phake::inOrder(Phake::verify($this->facade, Phake::atLeast(1))->wp_enqueue_script(Phake::anyParameters()), Phake::verify($this->facade)->wp_localize_script(Phake::anyParameters()));
 }
开发者ID:aenglander,项目名称:launchkey-wordpress,代码行数:5,代码来源:class-launchkey-wp-configuration-wizard-test.php

示例8: testLoggerLogsDebugWhenAdded

 public function testLoggerLogsDebugWhenAdded()
 {
     $this->whitelabelService = new BasicWhiteLabelService($this->apiService, $this->eventDispatcher, $this->logger);
     $this->whitelabelService->createUser("identifier");
     \Phake::verify($this->logger, \Phake::atLeast(1))->debug(\Phake::anyParameters());
 }
开发者ID:ThemeSurgeon,项目名称:launchkey-php,代码行数:6,代码来源:BasicWhiteLabelServiceTest.php


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