Skip to content

Commit 2f7cd23

Browse files
authored
Merge pull request #30 from WyriHaximus-labs/test-group-permissions
Run permission related tests with sudo
2 parents 8c2f05d + b3af333 commit 2f7cd23

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ install:
1818
- composer install -n
1919

2020
script:
21-
- ./vendor/bin/phpunit --coverage-text
21+
- ./vendor/bin/phpunit --exclude-group permissions
22+
- export phploc=~/.phpenv/versions/$(phpenv version-name)/bin/php
23+
- sudo $phploc ./vendor/bin/phpunit --group permissions

tests/Adapters/DirectoryTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public function testRemoveRecursive(LoopInterface $loop, FilesystemInterface $fi
129129

130130
/**
131131
* @dataProvider filesystemProvider
132+
* @group permissions
132133
*/
133134
public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem)
134135
{
@@ -152,6 +153,7 @@ public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem)
152153

153154
/**
154155
* @dataProvider filesystemProvider
156+
* @group permissions
155157
*/
156158
public function testChmodRecursive(LoopInterface $loop, FilesystemInterface $filesystem)
157159
{
@@ -175,6 +177,7 @@ public function testChmodRecursive(LoopInterface $loop, FilesystemInterface $fil
175177

176178
/**
177179
* @dataProvider filesystemProvider
180+
* @group permissions
178181
*/
179182
public function testChown(LoopInterface $loop, FilesystemInterface $filesystem)
180183
{
@@ -196,6 +199,7 @@ public function testChown(LoopInterface $loop, FilesystemInterface $filesystem)
196199

197200
/**
198201
* @dataProvider filesystemProvider
202+
* @group permissions
199203
*/
200204
public function testChownRecursive(LoopInterface $loop, FilesystemInterface $filesystem)
201205
{

tests/Adapters/FileTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ public function testCopyToDirectory(LoopInterface $loop, FilesystemInterface $fi
205205

206206
/**
207207
* @dataProvider filesystemProvider
208+
* @group permissions
208209
*/
209210
public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem)
210211
{
@@ -222,6 +223,7 @@ public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem)
222223

223224
/**
224225
* @dataProvider filesystemProvider
226+
* @group permissions
225227
*/
226228
public function testChownUid(LoopInterface $loop, FilesystemInterface $filesystem)
227229
{

0 commit comments

Comments
 (0)