Skip to content

Commit

Permalink
Fix some generated method names
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Jul 5, 2023
1 parent 9c7ae40 commit e79ad20
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
final class SampleURIGeneratorTest extends CIUnitTestCase
{
/**
* @dataProvider getProvider
* @dataProvider getRouteKeyProvider
*/
public function testGet(string $routeKey, string $expected)
public function testGetRouteKey(string $routeKey, string $expected)
{
$generator = new SampleURIGenerator();

Expand All @@ -34,7 +34,7 @@ public function testGet(string $routeKey, string $expected)
$this->assertSame($expected, $uri);
}

public function getProvider(): Generator
public function getRouteKeyProvider(): Generator
{
yield from [
'root' => ['/', '/'],
Expand Down
6 changes: 3 additions & 3 deletions tests/system/HTTP/IncomingRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ public function testGetPostIndexNotExists()
$this->assertNull($this->request->getGetPost('gc'));
}

public function extensionPHPProvider()
public function extensionPhpProvider()
{
return [
'not /index.php' => [
Expand All @@ -855,12 +855,12 @@ public function extensionPHPProvider()
}

/**
* @dataProvider extensionPHPProvider
* @dataProvider extensionPhpProvider
*
* @param mixed $path
* @param mixed $detectPath
*/
public function testExtensionPHP($path, $detectPath)
public function testExtensionPhp($path, $detectPath)
{
$config = new App();
$config->baseURL = 'http://example.com/';
Expand Down
6 changes: 3 additions & 3 deletions tests/system/Validation/CreditCardRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ protected function setUp(): void
}

/**
* @dataProvider validCCNumberProvider
* @dataProvider validCreditCardNumberProvider
*/
public function testValidCCNumber(string $type, ?string $number, bool $expected): void
public function testValidCreditCardNumber(string $type, ?string $number, bool $expected): void
{
$data = ['cc' => $number];
$this->validation->setRules(['cc' => "valid_cc_number[{$type}]"]);
Expand All @@ -64,7 +64,7 @@ public function testValidCCNumber(string $type, ?string $number, bool $expected)
*
* @see https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm
*/
public function validCCNumberProvider(): Generator
public function validCreditCardNumberProvider(): Generator
{
yield from [
'null_test' => [
Expand Down
6 changes: 3 additions & 3 deletions tests/system/Validation/StrictRules/CreditCardRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ protected function setUp(): void
}

/**
* @dataProvider validCCNumberProvider
* @dataProvider validCreditCardNumberProvider
*/
public function testValidCCNumber(string $type, ?string $number, bool $expected): void
public function testValidCreditCardNumber(string $type, ?string $number, bool $expected): void
{
$data = ['cc' => $number];
$this->validation->setRules(['cc' => "valid_cc_number[{$type}]"]);
Expand All @@ -65,7 +65,7 @@ public function testValidCCNumber(string $type, ?string $number, bool $expected)
*
* @see https://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm
*/
public function validCCNumberProvider(): Generator
public function validCreditCardNumberProvider(): Generator
{
yield from [
'null_test' => [
Expand Down
6 changes: 3 additions & 3 deletions tests/system/Validation/ValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@ public function testClosureRuleWithLabel(): void
/**
* @see https://github.com/codeigniter4/CodeIgniter4/issues/5368
*
* @dataProvider canValidatetArrayDataProvider
* @dataProvider canValidateArrayDataProvider
*
* @param mixed $value
*/
public function testCanValidatetArrayData($value, bool $expected): void
public function testCanValidateArrayData($value, bool $expected): void
{
$data = [];
$this->validation->setRules(['arr' => 'is_array']);
Expand All @@ -339,7 +339,7 @@ public function testCanValidatetArrayData($value, bool $expected): void
$this->assertSame($expected, $this->validation->run($data));
}

public function canValidatetArrayDataProvider(): Generator
public function canValidateArrayDataProvider(): Generator
{
yield 'list array' => [
[1, 2, 3, 4, 5],
Expand Down

0 comments on commit e79ad20

Please sign in to comment.