Skip to content
Permalink
Browse files

parameters number mismatch in function call

  • Loading branch information...
antograssiot committed Feb 22, 2016
1 parent d33aa5a commit 039068a0710ae37ba1cf7de1e14425eed7ad3f6d
@@ -250,8 +250,8 @@ public function testClearWithPrefixes()
]);
$dataOne = $dataTwo = $expected = 'content to cache';
$FileOne->write('prefix_one_key_one', $dataOne, DAY);
$FileTwo->write('prefix_two_key_two', $dataTwo, DAY);
$FileOne->write('prefix_one_key_one', $dataOne);
$FileTwo->write('prefix_two_key_two', $dataTwo);
$this->assertEquals($expected, $FileOne->read('prefix_one_key_one'));
$this->assertEquals($expected, $FileTwo->read('prefix_two_key_two'));
@@ -275,7 +275,7 @@ public function testClearWithGroups()
'groups' => ['short', 'round']
]);
$key = 'cake_test_test_key';
$engine->write($key, 'it works', DAY);
$engine->write($key, 'it works');
$engine->clear(false);
$this->assertFalse($engine->read($key), 'Key should have been removed');
}
@@ -115,8 +115,8 @@ public function testStylesGet()
$this->assertNull($this->output->styles('made_up_goop'));
$result = $this->output->styles();
$this->assertNotEmpty($result, 'error', 'Error is missing');
$this->assertNotEmpty($result, 'warning', 'Warning is missing');
$this->assertNotEmpty($result, 'Error is missing');
$this->assertNotEmpty($result, 'Warning is missing');
}
/**
@@ -1144,7 +1144,7 @@ public function testCheckNotModifiedNoInfo()
$RequestHandler = new RequestHandlerComponent($this->Controller->components());
$RequestHandler->response = $this->getMock('Cake\Network\Response', ['notModified', 'stop']);
$RequestHandler->response->expects($this->never())->method('notModified');
$this->assertNull($RequestHandler->beforeRender($event, '', $RequestHandler->response));
$this->assertNull($RequestHandler->beforeRender($event));
}
/**
@@ -481,7 +481,7 @@ public function testRedirectByCode($code, $msg)
{
$Controller = new Controller(null, new Response());
$response = $Controller->redirect('http://cakephp.org', (int)$code, false);
$response = $Controller->redirect('http://cakephp.org', (int)$code);
$this->assertEquals($code, $response->statusCode());
$this->assertEquals('http://cakephp.org', $response->header()['Location']);
$this->assertFalse($Controller->autoRender);
@@ -519,7 +519,7 @@ public function testRedirectBeforeRedirectModifyingStatusCode()
$response->statusCode(302);
}, 'Controller.beforeRedirect');
$response = $Controller->redirect('http://cakephp.org', 301, false);
$response = $Controller->redirect('http://cakephp.org', 301);
$this->assertEquals('http://cakephp.org', $response->header()['Location']);
$this->assertEquals(302, $response->statusCode());
@@ -134,10 +134,10 @@ public function testLogFunction()
$query->params = ['string', '3', null];
$engine = $this->getMock('\Cake\Log\Engine\BaseLog', ['log'], ['scopes' => ['queriesLog']]);
Log::engine('queryLoggerTest', $engine);
Log::engine('queryLoggerTest');
$engine2 = $this->getMock('\Cake\Log\Engine\BaseLog', ['log'], ['scopes' => ['foo']]);
Log::engine('queryLoggerTest2', $engine2);
Log::engine('queryLoggerTest2');
$engine2->expects($this->never())->method('log');
$logger->log($query);
@@ -52,7 +52,7 @@ public function count()
* @param \PHPUnit_Framework_TestResult $result
* @return \PHPUnit_Framework_TestResult
*/
public function run(PHPUnit_Framework_TestResult $result = null, $filter = false, array $groups = [], array $excludeGroups = [], $processIsolation = false)
public function run(PHPUnit_Framework_TestResult $result = null)
{
$permutations = [
'Identifier Quoting' => function () {
@@ -65,7 +65,7 @@ public function run(PHPUnit_Framework_TestResult $result = null, $filter = false
foreach ($permutations as $permutation) {
$permutation();
$result = parent::run($result, $filter, $groups, $excludeGroups, $processIsolation);
$result = parent::run($result);
}
return $result;
}
@@ -604,51 +604,51 @@ public function testCc()
public function testLuhn()
{
//American Express
$this->assertTrue(Validation::luhn('370482756063980', true));
$this->assertTrue(Validation::luhn('370482756063980'));
//BankCard
$this->assertTrue(Validation::luhn('5610745867413420', true));
$this->assertTrue(Validation::luhn('5610745867413420'));
//Diners Club 14
$this->assertTrue(Validation::luhn('30155483651028', true));
$this->assertTrue(Validation::luhn('30155483651028'));
//2004 MasterCard/Diners Club Alliance International 14
$this->assertTrue(Validation::luhn('36747701998969', true));
$this->assertTrue(Validation::luhn('36747701998969'));
//2004 MasterCard/Diners Club Alliance US & Canada 16
$this->assertTrue(Validation::luhn('5597511346169950', true));
$this->assertTrue(Validation::luhn('5597511346169950'));
//Discover
$this->assertTrue(Validation::luhn('6011802876467237', true));
$this->assertTrue(Validation::luhn('6011802876467237'));
//enRoute
$this->assertTrue(Validation::luhn('201496944158937', true));
$this->assertTrue(Validation::luhn('201496944158937'));
//JCB 15 digit
$this->assertTrue(Validation::luhn('210034762247893', true));
$this->assertTrue(Validation::luhn('210034762247893'));
//JCB 16 digit
$this->assertTrue(Validation::luhn('3096806857839939', true));
$this->assertTrue(Validation::luhn('3096806857839939'));
//Maestro (debit card)
$this->assertTrue(Validation::luhn('5020147409985219', true));
$this->assertTrue(Validation::luhn('5020147409985219'));
//Mastercard
$this->assertTrue(Validation::luhn('5580424361774366', true));
$this->assertTrue(Validation::luhn('5580424361774366'));
//Solo 16
$this->assertTrue(Validation::luhn('6767432107064987', true));
$this->assertTrue(Validation::luhn('6767432107064987'));
//Solo 18
$this->assertTrue(Validation::luhn('676714834398858593', true));
$this->assertTrue(Validation::luhn('676714834398858593'));
//Solo 19
$this->assertTrue(Validation::luhn('6767838565218340113', true));
$this->assertTrue(Validation::luhn('6767838565218340113'));
//Switch 16
$this->assertTrue(Validation::luhn('5641829171515733', true));
$this->assertTrue(Validation::luhn('5641829171515733'));
//Switch 18
$this->assertTrue(Validation::luhn('493622764224625174', true));
$this->assertTrue(Validation::luhn('493622764224625174'));
//Switch 19
$this->assertTrue(Validation::luhn('6759603460617628716', true));
$this->assertTrue(Validation::luhn('6759603460617628716'));
//VISA 13 digit
$this->assertTrue(Validation::luhn('4024007174754', true));
$this->assertTrue(Validation::luhn('4024007174754'));
//VISA 16 digit
$this->assertTrue(Validation::luhn('4916375389940009', true));
$this->assertTrue(Validation::luhn('4916375389940009'));
//Visa Electron
$this->assertTrue(Validation::luhn('4175003346287100', true));
$this->assertTrue(Validation::luhn('4175003346287100'));
//Voyager
$this->assertTrue(Validation::luhn('869940697287073', true));
$this->assertTrue(Validation::luhn('869940697287073'));
$this->assertFalse(Validation::luhn('0000000000000000', true));
$this->assertFalse(Validation::luhn('0000000000000000'));
$this->assertFalse(Validation::luhn('869940697287173', true));
$this->assertFalse(Validation::luhn('869940697287173'));
}
/**

0 comments on commit 039068a

Please sign in to comment.
You can’t perform that action at this time.