Skip to content

Commit 332bd90

Browse files
[Lock] Add tests for NullStore
1 parent 7c88214 commit 332bd90

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Tests/Store/NullStoreTest.php

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)