当前位置: 首页>>代码示例>>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;未经允许,请勿转载。