當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Phake::verify方法代碼示例

本文整理匯總了PHP中Phake::verify方法的典型用法代碼示例。如果您正苦於以下問題:PHP Phake::verify方法的具體用法?PHP Phake::verify怎麽用?PHP Phake::verify使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phake的用法示例。


在下文中一共展示了Phake::verify方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: test_launchkey_sso_session_redirects_to_logout_url_and_exits

 public function test_launchkey_sso_session_redirects_to_logout_url_and_exits()
 {
     $this->user->launchkey_sso_session = "Not Null";
     $this->client->logout();
     Phake::inOrder(Phake::verify($this->facade)->wp_redirect(static::LOGOUT_URL), Phake::verify($this->facade)->_exit(Phake::anyParameters()));
     Phake::verifyNoFurtherInteraction($this->facade);
 }
開發者ID:aenglander,項目名稱:launchkey-wordpress,代碼行數:7,代碼來源:class-launchkey-wp-sso-client-logout-test.php

示例2: testFindInTrans

 public function testFindInTrans()
 {
     $this->target->begin();
     $this->target->find('hoge', 'ssd', array('a', 'b', 3), 'fuga');
     \Phake::verify($this->write)->find('hoge', 'ssd', array('a', 'b', 3), 'fuga');
     \Phake::verify($this->read, \Phake::never())->find('hoge', 'ssd', array('a', 'b', 3), 'fuga');
 }
開發者ID:aainc,項目名稱:Mahotora,代碼行數:7,代碼來源:MultiDatabaseSessionTest.php

示例3: testRunAsWorker

 public function testRunAsWorker()
 {
     $receiver = \Phake::mock('ZMQSocket');
     $sender = \Phake::mock('ZMQSocket');
     $controller = \Phake::mock('ZMQSocket');
     $poller = \Phake::mock('ZMQPoll');
     $worker = \Phake::partialMock('\\Brook\\Worker');
     $task = \Phake::mock('\\Brook\\TaskInterface');
     // signal we are a child
     \Phake::when($worker)->fork()->thenReturn(0);
     \Phake::when($worker)->poll()->thenReturn(\Brook\Worker::READ_READY)->thenReturn(\Brook\Worker::SHUTDOWN);
     $message = "one message";
     \Phake::when($task)->setup()->thenReturn(null);
     \Phake::when($task)->tearDown()->thenReturn(null);
     \Phake::when($task)->work($message)->thenReturn($message);
     \Phake::when($receiver)->recv()->thenReturn($message);
     \Phake::when($sender)->send($message)->thenReturn(true);
     // verify
     $worker->setReceiver($receiver);
     $worker->setController($controller);
     $worker->setSender($sender);
     $worker->setPoller($poller);
     $this->assertEquals(1, $worker->run($task));
     \Phake::verify($worker)->fork();
     \Phake::verify($sender)->send($message);
     \Phake::verify($worker)->forward($message);
     \Phake::verify($task)->setup();
     \Phake::verify($task)->tearDown();
     \Phake::verify($task)->work($message);
 }
開發者ID:drsnyder,項目名稱:brook,代碼行數:30,代碼來源:WorkerTest.php

示例4: testCorrelationDataIsAttached

 public function testCorrelationDataIsAttached()
 {
     CorrelationDataHolder::setCorrelationData(array('correlationId' => 'test'));
     $this->testSubject->send(new HelloCommand('Hi !!!'));
     \Phake::verify($this->mockCommandBus)->dispatch(\Phake::capture($command), null);
     $this->assertEquals(array('correlationId' => 'test'), $command->getMetaData()->all());
 }
開發者ID:fcm,項目名稱:GovernorFramework,代碼行數:7,代碼來源:DefaultCommandGatewayTest.php

示例5: test_does_not_update_option_when_check_option_returns_errors

 public function test_does_not_update_option_when_check_option_returns_errors()
 {
     $_POST['nonce'] = 'not empty';
     Phake::when($this->admin)->check_option(Phake::anyParameters())->thenReturn(array(array(), array('error')));
     $this->wizard->wizard_submit_ajax();
     Phake::verify($this->facade, Phake::never())->update_option(Phake::anyParameters());
 }
開發者ID:ThemeSurgeon,項目名稱:launchkey-wordpress,代碼行數:7,代碼來源:class-launchkey-wp-configuration-wizard-submit-ajax-callback-test.php

示例6: parseNormal

 /**
  * @test
  */
 public function parseNormal()
 {
     \Phake::when($this->commentsParser)->parse(\Phake::anyParameters())->thenReturn(null);
     $stmts = (include __DIR__ . '/../fixtures/1/Model/Product.php.property_base.cache');
     $this->parser->parse($stmts, $this->property, $this->class);
     \Phake::verify($this->commentsParser)->parse(\Phake::anyParameters());
 }
開發者ID:domaincoder,項目名稱:code-metamodel-php,代碼行數:10,代碼來源:PropertyAnnotationsParserTest.php

示例7: parseNormal

 /**
  * @test
  */
 public function parseNormal()
 {
     \Phake::when($this->parser)->parse(\Phake::anyParameters())->thenReturn(null);
     $path = __DIR__ . '/../fixtures/1';
     $this->projectParser->parse($path);
     \Phake::verify($this->parser, \Phake::times(3))->parse(\Phake::anyParameters());
 }
開發者ID:domaincoder,項目名稱:code-metamodel-php,代碼行數:10,代碼來源:ProjectParserTest.php

示例8: 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

示例9: test_launchkey_logout_expires_cookies

 /**
  * @param $cookie_name
  *
  * @dataProvider cookie_name_provider
  */
 public function test_launchkey_logout_expires_cookies($cookie_name)
 {
     $_COOKIE['launchkey_access_token'] = 'access token';
     $this->client->launchkey_logout();
     Phake::verify($this->facade)->current_time('timestamp', true);
     Phake::verify($this->facade)->setcookie($cookie_name, '1', $this->current_time - 60, COOKIEPATH, COOKIE_DOMAIN);
 }
開發者ID:ThemeSurgeon,項目名稱:launchkey-wordpress,代碼行數:12,代碼來源:class-launchkey-wp-oauth-client-launchkey-logout-test.php

示例10: testWork

 public function testWork()
 {
     \Phake::when($this->scraper)->scrape(\Phake::anyParameters())->thenReturn(array(new Entity(), new Entity()));
     $result = $this->target->work(null);
     \Phake::verify($this->scraper)->scrape($this->definition);
     $this->assertCount(2, $result);
 }
開發者ID:t-ishida,項目名稱:Moshas,代碼行數:7,代碼來源:StartTest.php

示例11: testBuild

 public function testBuild()
 {
     $builder = \Phake::mock('Symfony\\Component\\DependencyInjection\\ContainerBuilder');
     $bundle = new ModeraMJRSecurityIntegrationBundle();
     $bundle->build($builder);
     \Phake::verify($builder, \Phake::times(1))->addCompilerPass($this->isInstanceOf('Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface'));
 }
開發者ID:modera,項目名稱:foundation,代碼行數:7,代碼來源:ModeraMJRSecurityIntegrationBundleTest.php

示例12: testFreeze

 public function testFreeze()
 {
     $client = Phake::mock('Phake_Client_IClient');
     $this->freezer->freeze($this->mockInfo, $client);
     Phake::verify($client)->processObjectFreeze();
     Phake::verify($this->mockInfo)->freezeObject();
 }
開發者ID:eric-seekas,項目名稱:Phake,代碼行數:7,代碼來源:FreezerTest.php

示例13: 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

示例14: testToString

 public function testToString()
 {
     Phake::when($this->adapted)->__toString->thenReturn('test string');
     $result = $this->matcher->__toString();
     Phake::verify($this->adapted)->__toString();
     $this->assertEquals('test string', $result);
 }
開發者ID:eric-seekas,項目名稱:Phake,代碼行數:7,代碼來源:ChainedArgumentMatcherTest.php

示例15: testMagicCallIsRecorded

 public function testMagicCallIsRecorded()
 {
     $mock = $this->getMock('Phake_IMock');
     $ref = array('foo', array());
     $this->handler->invoke($mock, '__call', array('foo', array()), $ref);
     Phake::verify($this->callRecorder)->recordCall(new Phake_CallRecorder_Call($mock, 'foo', array(), $this->mockReader));
 }
開發者ID:ngyuki,項目名稱:phake,代碼行數:7,代碼來源:MagicCallRecorderTest.php


注:本文中的Phake::verify方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。