diff --git a/src/Symfony/Component/Lock/Tests/Store/NullStoreTest.php b/src/Symfony/Component/Lock/Tests/Store/NullStoreTest.php new file mode 100644 index 0000000000000..abbb52f0c6189 --- /dev/null +++ b/src/Symfony/Component/Lock/Tests/Store/NullStoreTest.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Lock\Tests\Store; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Lock\Key; +use Symfony\Component\Lock\Store\NullStore; + +class NullStoreTest extends TestCase +{ + public function testExistsAlwaysReturnsFalse() + { + $store = new NullStore(); + $key = new Key('foo'); + + $this->assertFalse($store->exists($key)); + } + + public function testSaveDoesNothing() + { + $store = new NullStore(); + $key = new Key('foo'); + + $store->save($key); + + $this->assertFalse($store->exists($key)); + } +}