-
Notifications
You must be signed in to change notification settings - Fork 772
/
CurrencyCodeTest.php
55 lines (47 loc) · 1.06 KB
/
CurrencyCodeTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/*
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
* SPDX-License-Identifier: MIT
*/
declare(strict_types=1);
namespace Respect\Validation\Rules;
use Respect\Validation\Test\RuleTestCase;
/**
* @group rule
*
* @covers \Respect\Validation\Rules\CurrencyCode
*
* @author Henrique Moody <henriquemoody@gmail.com>
* @author Justin Hook <justinhook88@yahoo.co.uk>
* @author William Espindola <oi@williamespindola.com.br>
*/
final class CurrencyCodeTest extends RuleTestCase
{
/**
* {@inheritDoc}
*/
public function providerForValidInput(): array
{
$rule = new CurrencyCode();
return [
[$rule, 'EUR'],
[$rule, 'GBP'],
[$rule, 'XAU'],
[$rule, 'XBA'],
[$rule, 'XXX'],
];
}
/**
* {@inheritDoc}
*/
public function providerForInvalidInput(): array
{
$rule = new CurrencyCode();
return [
[$rule, ''],
[$rule, 'BTC'],
[$rule, 'GGP'],
[$rule, 'USA'],
];
}
}