Replace the usages of "--EXPECTF--" by "--EXPECT--"

The "--EXPECTF--" is supposed to be used when the output of "--FILE--"
is random. In many cases, we are using "--EXPECTF--" section while we
could use "--EXPECT--" instead.

This commit will replace the usages of "--EXPECTF--" by "--EXPECT--"
when the output does "--FILE--" is not random.

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2018-12-19 18:05:58 +01:00
parent 54293d4ca2
commit fbaf78fc39
No known key found for this signature in database
GPG key ID: 221E9281655813A6
181 changed files with 181 additions and 181 deletions

View file

@ -48,7 +48,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
- All of the required rules must pass for the given data
- These rules must pass for mysql
- host must be of type string

View file

@ -41,7 +41,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
- All of the required rules must pass for the given data
- All of the required rules must pass for mysql
- host must be of type string

View file

@ -9,4 +9,4 @@ use Respect\Validation\Validator as v;
v::bsn()->check('612890053');
?>
--EXPECTF--
--EXPECT--

View file

@ -15,5 +15,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
"acb" must be a BSN

View file

@ -15,5 +15,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
`NULL` must be a BSN

View file

@ -19,5 +19,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
"really messed up screen#name" must contain only letters (a-z), digits (0-9) and "_"

View file

@ -18,5 +18,5 @@ try {
echo $exception->getMessage();
}
?>
--EXPECTF--
--EXPECT--
"abc123" não deve conter letras (a-z) ou dígitos (0-9)

View file

@ -15,7 +15,7 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- All of the required rules must pass for 0
- 0 must be of type string
- 0 must have a length between 2 and 15

View file

@ -42,7 +42,7 @@ try {
print_r($exception->getMessages());
}
?>
--EXPECTF--
--EXPECT--
Array
(
[mysql] => Array

View file

@ -28,7 +28,7 @@ try {
print_r($e->getMessages());
}
?>
--EXPECTF--
--EXPECT--
Array
(
[username] => username must have a length between 2 and 32

View file

@ -50,7 +50,7 @@ try {
]));
}
?>
--EXPECTF--
--EXPECT--
Array
(
[mysql] => Array

View file

@ -33,7 +33,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"42.33" must be an integer number
2 must not be an integer number
- "Foo" must be an integer number

View file

@ -22,7 +22,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
- Each item in `{ "A", "B", "B" }` must be valid
- "A" must equal 1
- "B" must equal 1

View file

@ -27,7 +27,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
- These rules must pass for Settings
- host must be of type string
- Key user must be present

View file

@ -26,7 +26,7 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- These rules must pass for `{ "age": 1 }`
- Key reference must be present
- These rules must pass for `{ "reference": "QSF1234" }`

View file

@ -22,7 +22,7 @@ try {
print_r($e->getMessages());
}
?>
--EXPECTF--
--EXPECT--
Array
(
[name] => name must have a length between 2 and 32

View file

@ -15,5 +15,5 @@ try {
print_r($exception->getMessage());
}
?>
--EXPECTF--
--EXPECT--
invalid object

View file

@ -37,5 +37,5 @@ try {
echo $exception->getMessage();
}
?>
--EXPECTF--
--EXPECT--
phoneNumbers.personal.number must be a valid telephone number

View file

@ -46,7 +46,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
- All of the required rules must pass for the given data
- These rules must pass for mysql
- host must be of type string

View file

@ -35,6 +35,6 @@ try {
echo $exception->getMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
All of the required rules must pass for "http://www.google.com/search?q=respect.github.com"
All of the required rules must pass for "http://www.google.com/search?q=respect.github.com"

View file

@ -15,7 +15,7 @@ try {
print_r($exception->getMessages());
}
?>
--EXPECTF--
--EXPECT--
Array
(
[email] => WRONG EMAIL!!!!!!

View file

@ -21,7 +21,7 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- All of the required rules must pass for User Subscription Form
- username must have a length between 2 and 32
- birthdate must be a valid date/time

View file

@ -10,5 +10,5 @@ use Respect\Validation\Validator;
var_dump(Validator::not(Validator::intVal())->validate(10));
?>
--EXPECTF--
--EXPECT--
bool(false)

View file

@ -26,5 +26,5 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
- These rules must not pass for 2

View file

@ -18,5 +18,5 @@ try {
echo $exception->getMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
2 must not be positive

View file

@ -20,7 +20,7 @@ try {
);
}
?>
--EXPECTF--
--EXPECT--
Array
(
[alnum] => "really messed up screen#name" must contain only letters and digits

View file

@ -19,4 +19,4 @@ $userValidator = v::attribute('name', v::stringType()->length(1, 32))
$userValidator->assert($user);
?>
--EXPECTF--
--EXPECT--

View file

@ -14,7 +14,7 @@ try {
echo $exception->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- All of the required rules must pass for "really messed up screen#name"
- "really messed up screen#name" must contain only letters (a-z) and digits (0-9)
- "really messed up screen#name" must not contain whitespace

View file

@ -14,7 +14,7 @@ try {
print_r($exception->getMessages());
}
?>
--EXPECTF--
--EXPECT--
Array
(
[alnum] => "really messed up screen#name" must contain only letters (a-z) and digits (0-9)

View file

@ -14,7 +14,7 @@ try {
print_r($exception->getMessages());
}
?>
--EXPECTF--
--EXPECT--
Array
(
[alnum] => "really messed up screen#name" must contain only letters (a-z) and digits (0-9)

View file

@ -15,4 +15,4 @@ v::allOf(v::intVal(), v::negative())->check(-42);
v::not(v::allOf(v::dateTime(), v::between('2014-12-01', '2014-12-12')))->assert('2012-01-01');
v::not(v::allOf(v::stringType(), v::consonant()))->check('I am Jack\'s smirking revenge');
?>
--EXPECTF--
--EXPECT--

View file

@ -14,5 +14,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
"Luke i'm your father" must contain only consonants

View file

@ -14,7 +14,7 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- All of the required rules must pass for 42
- 42 must be of type string
- 42 must contain only consonants

View file

@ -14,5 +14,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
42 must not be of type integer

View file

@ -14,5 +14,5 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- "Frank Zappa is fantastic" must not be of type string

View file

@ -57,7 +57,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"abc%1" must contain only letters (a-z) and digits (0-9)
"abc%2" must contain only letters (a-z), digits (0-9) and " "
"abcd3" must not contain letters (a-z) or digits (0-9)

View file

@ -20,6 +20,6 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"whatever" is always invalid
- "" is always invalid

View file

@ -21,6 +21,6 @@ try {
}
?>
--EXPECTF--
--EXPECT--
`TRUE` is always invalid
- `TRUE` is always invalid

View file

@ -33,7 +33,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"teste" must be of type array
`{ }` must not be of type array
- `[traversable] (ArrayObject: { })` must be of type array

View file

@ -34,7 +34,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"Bla %123" must be an array value
`{ 42 }` must not be an array value
- `[object] (stdClass: { })` must be an array value

View file

@ -33,7 +33,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"Z01xSsg5675hic20dj" must be a number in the base 61
- "" must be a number in the base 2
"011010001" must not be a number in the base 2

View file

@ -35,7 +35,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"=c3VyZS4" must be Base64-encoded
"c3VyZS4=" must not be Base64-encoded
- "=c3VyZS4" must be Base64-encoded

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
0 must be between 1 and 2
"today" must not be between "yesterday" and "tomorrow"
- "d" must be between "a" and "c"

View file

@ -14,5 +14,5 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- "a" must not be between "a" and "b"

View file

@ -14,5 +14,5 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- 41 must not be between 1 and 42

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"teste" must be of type boolean
`TRUE` must not be of type boolean
- `{ }` must be of type boolean

View file

@ -34,7 +34,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"ok" must be a boolean value
"yes" must not be a boolean value
- "yep" must be a boolean value

View file

@ -33,7 +33,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"acb" must be a BSN
"612890053" must not be a BSN
- "abc" must be a BSN

View file

@ -33,7 +33,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
`{ }` must be callable
"trim" must not be callable
- `TRUE` must be callable

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
`{ }` must be valid
"foo" must not be valid
- `TRUE` must be valid

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"açaí" must be in the `{ "ASCII" }` charset
"açaí" must not be in the `{ "UTF-8" }` charset
- "açaí" must be in the `{ "ASCII" }` charset

View file

@ -32,7 +32,7 @@ try {
echo $e->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"batman" must be a valid CNH number
"02650306461" must not be a valid CNH number
- "bruce wayne" must be a valid CNH number

View file

@ -33,7 +33,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"não cnpj" must be a valid CNPJ number
"65.150.175/0001-20" must not be a valid CNPJ number
- "test" must be a valid CNPJ number

View file

@ -12,4 +12,4 @@ v::consonant()->assert('ddd');
v::not(v::consonant())->check('uou');
v::not(v::consonant())->assert('aaaaa');
?>
--EXPECTF--
--EXPECT--

View file

@ -14,5 +14,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
"top nos falsetes" must contain only consonants

View file

@ -14,5 +14,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
"ddd" must not contain consonants

View file

@ -14,5 +14,5 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- "Jaspion" must contain only consonants

View file

@ -14,5 +14,5 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- "bb" must not contain consonants

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
"bar" must contain the value "foo"
"fool" must not contain the value "foo"
- `{ "bar" }` must contain the value "foo"

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
1.0 must be countable
`{ }` must not be countable
- "Not countable!" must be countable

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"1" must be a valid country
"BR" must not be a valid country
- "1" must be a valid country

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"this thing" must be a valid CPF number
"276.865.775-11" must not be a valid CPF number
- "your mother" must be a valid CPF number

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
3566002020360505 must be a valid "Discover" Credit Card number
4024007153361885 must not be a valid "Visa" Credit Card number
- 3566002020360505 must be a valid "MasterCard" Credit Card number

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"batman" must be a valid currency
"BRL" must not be a valid currency
- "ppz" must be a valid currency

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"2018-01-29T08:32:54+00:00" must be a valid date in the format "2005-12-30"
"2018-01-29" must not be a valid date in the format "2005-12-30"
- "2018-01-29T08:32:54+00:00" must be a valid date in the format "2005-12-30"

View file

@ -57,7 +57,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
"FooBarBazz" must be a valid date/time
"06-12-1995" must be a valid date/time in the format "2005-12-30T01:02:03+00:00"
- "QuxQuuxx" must be a valid date/time

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"batman" must be a directory
"/" must not be a directory
- "ppz" must be a directory

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
Each item in `NULL` must be valid
Each item in `{ "2018-10-10" }` must not validate
- Each item in `NULL` must be valid

View file

@ -32,7 +32,7 @@ try {
echo $e->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"batman" must be valid email
"bruce.wayne@gothancity.com" must not be an email
- "bruce wayne" must be valid email

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
"bar" must end with "foo"
`{ "bar", "foo" }` must not end with "foo"
- "" must end with "foo"

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
321 must equal 123
321 must not equal 321
- 321 must equal 123

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
`FALSE` must be equivalent to `TRUE`
"someThing" must not be equivalent to "Something"
- "true" must be equivalent to 123

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
-1 must be an even number
- 5 must be an even number
6 must not be an even number

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
"bar" must be an executable file
"tests/fixtures/executable" must not be an executable file
- "bar" must be an executable file

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"/path/of/a/non-existent/file" must exists
"tests/fixtures/valid-image.gif" must not exists
- "/path/of/a/non-existent/file" must exists

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"filename.txt" must have "png" extension
"filename.gif" must not have "gif" extension
- "filename.wav" must have "mp3" extension

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
2 must be a factor of 3
300 must not be a factor of 0
- 3 must be a factor of 5

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
`TRUE` is not considered as "False"
"false" is considered as "False"
- 1 is not considered as "False"

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
4 must be a valid Fibonacci number
5 must not be a valid Fibonacci number
- 16 must be a valid Fibonacci number

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"tests/fixtures/non-existent.sh" must be a file
"tests/fixtures/valid-image.png" must not be a file
- "tests/fixtures/non-existent.sh" must be a file

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
42 must be valid
"On" must not be valid
- 1.5 must be valid

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"42.33" must be of type float
`INF` must not be of type float
- `TRUE` must be of type float

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
"a" must be a float number
165.0 must not be a float number
- "a" must be a float number

View file

@ -32,4 +32,4 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
321 must be identical as 123
321 must not be identical as 321
- 321 must be identical as 123

View file

@ -10,4 +10,4 @@ use Respect\Validation\Validator as v;
v::identityCard('PL')->check('AYE205410');
v::identityCard('PL')->assert('AYE205410');
?>
--EXPECTF--
--EXPECT--

View file

@ -14,5 +14,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
"AYE205411" must be a valid Polish Identity Card number

View file

@ -14,5 +14,5 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- "AYE205411" must be a valid Polish Identity Card number

View file

@ -14,5 +14,5 @@ try {
echo $e->getMessage();
}
?>
--EXPECTF--
--EXPECT--
"AYE205410" must not be a valid Identity Card number for "PL"

View file

@ -14,5 +14,5 @@ try {
echo $e->getFullMessage();
}
?>
--EXPECTF--
--EXPECT--
- "AYE205410" must not be a valid Identity Card number for "PL"

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
"tests/fixtures/invalid-image.png" must be a valid image
"tests/fixtures/valid-image.png" must not be a valid image
- `[object] (stdClass: { })` must be a valid image

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
"490154203237512" must be a valid IMEI
"350077523237513" must not be a valid IMEI
- `NULL` must be a valid IMEI

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
1 must be in `{ 3, 2 }`
"foo" must not be in "foobar"
- "2" must be in `{ 2, "1", 3 }`

View file

@ -33,7 +33,7 @@ try {
}
?>
--EXPECTF--
--EXPECT--
-9 must be an infinite number
`INF` must not be an infinite number
- `[object] (stdClass: { })` must be an infinite number

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"" must be an instance of "DateTime"
`[traversable] (ArrayObject: { })` must not be an instance of "Traversable"
- `[object] (stdClass: { })` must be an instance of "ArrayIterator"

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
`[object] (stdClass: { })` must be of type integer
42 must not be of type integer
- `INF` must be of type integer

View file

@ -57,7 +57,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
"257.0.0.1" must be an IP address
"127.0.0.1" must not be an IP address
"127.0.0.1" must be an IP address in the "127.0.1.0-127.0.1.255" range

View file

@ -33,7 +33,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
3 must be iterable
`{ 2, 3 }` must not be iterable
- "String" must be iterable

View file

@ -32,7 +32,7 @@ try {
echo $exception->getFullMessage().PHP_EOL;
}
?>
--EXPECTF--
--EXPECT--
`FALSE` must be a valid JSON string
"{\"foo\": \"bar\", \"number\":1}" must not be a valid JSON string
- `[object] (stdClass: { })` must be a valid JSON string

View file

@ -28,7 +28,7 @@ var_dump(v::keyNested('foo.bar')->validate($object));
var_dump(v::keyNested('foo.bar', v::stringType())->validate($object));
var_dump(v::keyNested('foo.bar.baz', v::notEmpty(), false)->validate($object));
?>
--EXPECTF--
--EXPECT--
bool(false)
bool(true)
bool(true)

Some files were not shown because too many files have changed in this diff Show more