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


PHP Phake::ignoreRemaining方法代碼示例

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


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

示例1: testPost

 public function testPost()
 {
     $budgetaryItemRepoMock = \Phake::mock('myfinance\\repositories\\BudgetaryItemRepository');
     $controller = new BudgetaryController($budgetaryItemRepoMock);
     $json = '{"description":"Autoausgaben"}';
     $controller->post(json_decode($json));
     \Phake::verify($budgetaryItemRepoMock)->create(\Phake::ignoreRemaining());
 }
開發者ID:eulor,項目名稱:myfinanceRESTful,代碼行數:8,代碼來源:BudgetaryControllerTest.php

示例2: testPost

 public function testPost()
 {
     $accountingEntryRepoMock = \Phake::mock('myfinance\\repositories\\AccountingEntryRepository');
     $controller = new AccountingEntryController($accountingEntryRepoMock);
     $json = '{"amount":"12.15",description":"Reperatur bei Autohaus","date":"2015-09-03","account":"1","category","2"}';
     $controller->post(json_decode($json));
     \Phake::verify($accountingEntryRepoMock)->create(\Phake::ignoreRemaining());
 }
開發者ID:eulor,項目名稱:myfinanceRESTful,代碼行數:8,代碼來源:AccountingEntryControllerTest.php

示例3: testPost

 public function testPost()
 {
     $accountRepoMock = \Phake::mock('myfinance\\repositories\\AccountRepository');
     $controller = new AccountController($accountRepoMock);
     $json = '{"description":"LUKB von User1","saldo":"0.00"}';
     $controller->post(json_decode($json));
     \Phake::verify($accountRepoMock)->create(\Phake::ignoreRemaining());
 }
開發者ID:eulor,項目名稱:myfinanceRESTful,代碼行數:8,代碼來源:AccountControllerTest.php

示例4: testPost

 public function testPost()
 {
     $categoryMock = \Phake::mock('myfinance\\repositories\\CategoryRepository');
     $controller = new CategoryController($categoryMock);
     $json = '{"type":"1","description":"Bargeldbezug","budgetaryItem":"2"}';
     $controller->post(json_decode($json));
     \Phake::verify($categoryMock)->create(\Phake::ignoreRemaining());
 }
開發者ID:eulor,項目名稱:myfinanceRESTful,代碼行數:8,代碼來源:CategoryControllerTest.php

示例5: testPost

 public function testPost()
 {
     $quotaMock = \Phake::mock('myfinance\\repositories\\QuotaRepository');
     $controller = new QuotaController($quotaMock);
     $json = '{"value":"10000","monthNumber":"3","yearNumber":"2015","budgetaryItem":"2"}';
     $controller->post(json_decode($json));
     \Phake::verify($quotaMock)->create(\Phake::ignoreRemaining());
 }
開發者ID:eulor,項目名稱:myfinanceRESTful,代碼行數:8,代碼來源:QuotaControllerTest.php

示例6: testDeleteByNegativeIdExpectException

 public function testDeleteByNegativeIdExpectException()
 {
     $quotaMock = \Phake::mock('myfinance\\model\\Quota');
     $contextMock = \Phake::mock('myfinance\\FinanceContext');
     $dbMock = \Phake::mock('myfinance\\db\\MysqlDB');
     \Phake::when($contextMock)->getUser()->thenReturn(\Phake::mock('myfinance\\model\\User'));
     \Phake::when($contextMock)->getDb()->thenReturn($dbMock);
     \Phake::when($dbMock)->query(\Phake::ignoreRemaining())->thenReturn(false);
     \Phake::when($dbMock)->get($quotaMock->id)->thenReturn($quotaMock);
     $repo = new MysqlQuotaRepository($contextMock);
     $id = -1;
     $this->setExpectedException('Exception');
     $repo->deleteById($id);
 }
開發者ID:eulor,項目名稱:myfinanceRESTful,代碼行數:14,代碼來源:MysqlQuotaRepositoryTest.php

示例7: testIgnoreRemainingThrowsAnErrorWithTrailingParameters

 public function testIgnoreRemainingThrowsAnErrorWithTrailingParameters()
 {
     $mock = Phake::mock('PhakeTest_MockedClass');
     $mock->fooWithLotsOfParameters(3, 2, 1);
     $this->setExpectedException('InvalidArgumentException', 'Other matchers cannot be checked after you ignore remaining parameters.');
     Phake::verify($mock)->fooWithLotsOfParameters(Phake::ignoreRemaining(), 1);
 }
開發者ID:kore,項目名稱:Phake,代碼行數:7,代碼來源:PhakeTest.php

示例8: testCheckAccountWithBadAccountName

 /**
  * Test checkAccount method with bad account name.
  *
  * @expectedException SecretSales\Bundle\TestBundle\Exception\AccountNameNotFoundException
  * @expectedExceptionMessage Wrong account name ! Please verify if the account name "testBadAccountName" exist
  */
 public function testCheckAccountWithBadAccountName()
 {
     $fixtures = new TwitterResponseFixtures();
     \Phake::when($this->twitterOauth)->get('users/show', \Phake::ignoreRemaining())->thenReturn($fixtures->getFixtureErrorObject());
     $this->twitterProvider->checkAccount('testBadAccountName');
 }
開發者ID:oktapodia,項目名稱:ss-test,代碼行數:12,代碼來源:TwitterProviderTest.php


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