File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,43 @@ public function testCnpjFormato()
74
74
$ this ->assertTrue ($ incorrect ->fails ());
75
75
}
76
76
77
+
78
+ public function testCpfCnpj ()
79
+ {
80
+ $ correct = \Validator::make (
81
+ ['certo ' => '53.084.587/0001-20 ' ],
82
+ ['certo ' => 'cpf-cnpj ' ]
83
+ );
84
+
85
+ $ incorrect = \Validator::make (
86
+ ['errado ' => '99800-1926 ' ],
87
+ ['errado ' => 'cpf-cnpj ' ]
88
+ );
89
+
90
+ $ this ->assertTrue ($ correct ->passes ());
91
+
92
+ $ this ->assertTrue ($ incorrect ->fails ());
93
+ }
94
+
95
+
96
+ public function testCpfCnpjFormato ()
97
+ {
98
+ $ correct = \Validator::make (
99
+ ['certo ' => '094.050.986-59 ' ],
100
+ ['certo ' => 'formato-cpf-cnpj ' ]
101
+ );
102
+
103
+ $ incorrect = \Validator::make (
104
+ ['errado ' => '51.084.587/000120 ' ],
105
+ ['errado ' => 'formato-cpf-cnpj ' ]
106
+ );
107
+
108
+ $ this ->assertTrue ($ correct ->passes ());
109
+
110
+ $ this ->assertTrue ($ incorrect ->fails ());
111
+ }
112
+
113
+
77
114
public function testCnh ()
78
115
{
79
116
$ correct = \Validator::make (
You can’t perform that action at this time.
0 commit comments