Skip to content

Commit f0d3ebe

Browse files
committed
Create standard class alias for Validator
This alias will reduce the PHPT files, making it more convenient to write and test them while in development.
1 parent c4ebcd9 commit f0d3ebe

File tree

187 files changed

+16
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+16
-370
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"Respect\\Validation\\Test\\": "tests/library/"
6060
},
6161
"files": [
62+
"tests/integration/lib/aliases.php",
6263
"tests/integration/lib/helpers.php"
6364
]
6465
},

tests/integration/assert-with-attributes.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ declare(strict_types=1);
55

66
require 'vendor/autoload.php';
77

8-
use Respect\Validation\Validator as v;
9-
108
exceptionFullMessage(static function (): void {
119
$array = [
1210
'mysql' => [

tests/integration/assert-with-keys.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ declare(strict_types=1);
55

66
require 'vendor/autoload.php';
77

8-
use Respect\Validation\Validator as v;
9-
108
exceptionFullMessage(static function (): void {
119
v::create()
1210
->key(

tests/integration/get_messages.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ declare(strict_types=1);
55

66
require 'vendor/autoload.php';
77

8-
use Respect\Validation\Validator as v;
9-
108
exceptionMessages(static function (): void {
119
v::create()
1210
->key(

tests/integration/get_messages_with_replacements.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ declare(strict_types=1);
55

66
require 'vendor/autoload.php';
77

8-
use Respect\Validation\Validator as v;
9-
108
exceptionMessages(
119
static function (): void {
1210
v::create()

tests/integration/issue-1033.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ declare(strict_types=1);
1313

1414
require 'vendor/autoload.php';
1515

16-
use Respect\Validation\Validator as v;
17-
1816
exceptionFullMessage(static fn() => v::each(v::equals(1))->assert(['A', 'B', 'B']));
1917
?>
2018
--EXPECT--

tests/integration/issue-1244.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ declare(strict_types=1);
55

66
require 'vendor/autoload.php';
77

8-
use Respect\Validation\Validator as v;
9-
108
exceptionMessages(static fn () => v::key('firstname', v::notBlank()->setName('First Name'))->assert([]));
119
?>
1210
--EXPECTF--

tests/integration/issue-1333.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
declare(strict_types=1);
55

6-
use Respect\Validation\Validator as v;
7-
86
require 'vendor/autoload.php';
97

108
exceptionMessages(static fn() => v::noWhitespace()->email()->setName('User Email')->assert('not email'));

tests/integration/issue-1376.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ declare(strict_types=1);
55

66
require 'vendor/autoload.php';
77

8-
use Respect\Validation\Validator as v;
9-
108
exceptionFullMessage(static function (): void {
119
v::property('title', v::lengthBetween(2, 3)->stringType())
1210
->property('description', v::stringType())

tests/integration/issue-179.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ declare(strict_types=1);
55

66
require 'vendor/autoload.php';
77

8-
use Respect\Validation\Validator as v;
9-
108
$config = [
119
'host' => 1,
1210
'password' => 'my_password',

0 commit comments

Comments
 (0)