File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,10 @@ public function testAquireAndReleaseLock()
105
105
*/
106
106
public function testLockFileShouldContainCurrentPid ()
107
107
{
108
+ if ($ this ->helper ->getPlatform () === Helper::WINDOWS ) {
109
+ $ this ->markTestSkipped ("It's not possible to read contents of a locked file on Windows " );
110
+ }
111
+
108
112
$ this ->helper ->acquireLock ($ this ->lockFile );
109
113
$ this ->assertEquals (getmypid (), file_get_contents ($ this ->lockFile ));
110
114
@@ -136,6 +140,10 @@ public function testLockLifetimeShouldBeZeroIfFileIsEmpty()
136
140
*/
137
141
public function testLockLifetimeShouldBeZeroIfItContainsAInvalidPid ()
138
142
{
143
+ if ($ this ->helper ->getPlatform () === Helper::WINDOWS ) {
144
+ $ this ->markTestSkipped ("Test relies on posix_ functions " );
145
+ }
146
+
139
147
file_put_contents ($ this ->lockFile , 'invalid-pid ' );
140
148
$ this ->assertEquals (0 , $ this ->helper ->getLockLifetime ($ this ->lockFile ));
141
149
}
@@ -145,6 +153,10 @@ public function testLockLifetimeShouldBeZeroIfItContainsAInvalidPid()
145
153
*/
146
154
public function testGetLocklifetime ()
147
155
{
156
+ if ($ this ->helper ->getPlatform () === Helper::WINDOWS ) {
157
+ $ this ->markTestSkipped ("Unable to read a locked file on Windows " );
158
+ }
159
+
148
160
$ this ->helper ->acquireLock ($ this ->lockFile );
149
161
150
162
$ this ->assertEquals (0 , $ this ->helper ->getLockLifetime ($ this ->lockFile ));
You can’t perform that action at this time.
0 commit comments