8000 minor #58531 [Lock] Add tests for `NullStore` (alexandre-daubois) · symfony/symfony@4348890 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4348890

Browse files
committed
minor #58531 [Lock] Add tests for NullStore (alexandre-daubois)
This PR was merged into the 7.2 branch. Discussion ---------- [Lock] Add tests for `NullStore` | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Commits ------- 978e189 [Lock] Add tests for `NullStore`
2 parents 643745f + 978e189 commit 4348890

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Lock\Tests\Store;
13+
14+
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\Lock\Key;
16+
use Symfony\Component\Lock\Store\NullStore;
17+
18+
class NullStoreTest extends TestCase
19+
{
20+
public function testExistsAlwaysReturnsFalse()
21+
{
22+
$store = new NullStore();
23+
$key = new Key('foo');
24+
25+
$this->assertFalse($store->exists($key));
26+
}
27+
28+
public function testSaveDoesNothing()
29+
{
30+
$store = new NullStore();
31+
$key = new Key('foo');
32+
33+
$store->save($key);
34+
35+
$this->assertFalse($store->exists($key));
36+
}
37+
}

0 commit comments

Comments
 (0)
0