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