Skip to content

Commit c7bf55e

Browse files
committed
Prepare v3.1.0
1 parent 1369ff3 commit c7bf55e

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## 3.1.0 - 2018-10-29
5+
6+
### Other changes
7+
- Refactor assertion messages for `Assert\Assertion::notEq()`, `Assert\Assertion::notSame()`, and `Assert\Assertion::notInArray()` (Thanks to [Rick Kuipers](https://github.com/beberlei/assert/pull/259))
8+
49
## 3.0.1 - 2018-07-04
510

611
### Added assertions
712
- `Assertion::notRegex()` (Thanks to [Thomas Müller](https://github.com/beberlei/assert/pull/261))
813

914
### Other changes
10-
Upgraded regex and unit tests for `Assert\Assertion::url()` to latest from Symfony/Validator
15+
- Upgraded regex and unit tests for `Assert\Assertion::url()` to latest from Symfony/Validator
1116

1217
## 3.0.0 - 2018-07-04
1318

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
namespace Assert\Tests;
4+
5+
use Assert\Assert;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class LazyArrayTest extends TestCase
9+
{
10+
public function testLazyArray()
11+
{
12+
$form = [
13+
'email' => '[email protected]',
14+
'password' => 'Some highly secret password',
15+
];
16+
17+
$this->assertTrue(Assert::lazy()
18+
19+
->that($form['email'] ?? null, 'email')
20+
->notEmpty()
21+
->maxLength(255)
22+
->email()
23+
24+
->that($form['password'] ?? null, 'password')
25+
->notEmpty()
26+
->minLength(4)
27+
->maxLength(255)
28+
29+
->verifyNow()
30+
);
31+
}
32+
}

0 commit comments

Comments
 (0)