本文整理汇总了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'));
}
示例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());
}
示例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();
}
示例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();
}
示例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());
}
示例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());
}