File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
lib/internal/Magento/Framework/Lock/Test/Unit/Backend Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \Framework \Lock \Test \Unit \Backend ;
9
+
10
+ use Magento \Framework \Lock \Backend \Zookeeper as ZookeeperProvider ;
11
+ use PHPUnit \Framework \TestCase ;
12
+ use PHPUnit \Framework \MockObject \MockObject ;
13
+
14
+ class ZookeeperTest extends TestCase
15
+ {
16
+ /**
17
+ * @var \Zookeeper|MockObject
18
+ */
19
+ private $ zookeeperMock ;
20
+
21
+ /**
22
+ * @var ZookeeperProvider
23
+ */
24
+ private $ zookeeperProvider ;
25
+
26
+ /**
27
+ * @var string
28
+ */
29
+ private $ host = 'localhost:123 ' ;
30
+
31
+ /**
32
+ * @var string
33
+ */
34
+ private $ path = '/some/path ' ;
35
+
36
+ /**
37
+ * @inheritdoc
38
+ */
39
+ protected function setUp ()
40
+ {
41
+ $ this ->zookeeperProvider = new ZookeeperProvider ($ this ->host , '/some/path/ ' );
42
+ }
43
+
44
+ /**
45
+ * @expectedException \Magento\Framework\Exception\RuntimeException
46
+ * @expectedExceptionMessage The path needs to be a non-empty string.
47
+ */
48
+ public function testConstructionWithException ()
49
+ {
50
+ $ this ->zookeeperProvider = new ZookeeperProvider ('some host ' , '' );
51
+ }
52
+
53
+
54
+ }
You can’t perform that action at this time.
0 commit comments