From b3af333df837bd6cd49d2ab2cf313770d16720f0 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Mon, 28 May 2018 18:29:28 +0200 Subject: [PATCH] Run permission related tests with sudo This prevents us from running into any permission oddities --- .travis.yml | 4 +++- tests/Adapters/DirectoryTest.php | 4 ++++ tests/Adapters/FileTest.php | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ee35159e..196c41c5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,4 +18,6 @@ install: - composer install -n script: - - ./vendor/bin/phpunit --coverage-text + - ./vendor/bin/phpunit --exclude-group permissions + - export phploc=~/.phpenv/versions/$(phpenv version-name)/bin/php + - sudo $phploc ./vendor/bin/phpunit --group permissions diff --git a/tests/Adapters/DirectoryTest.php b/tests/Adapters/DirectoryTest.php index e08c9a59..d4382357 100644 --- a/tests/Adapters/DirectoryTest.php +++ b/tests/Adapters/DirectoryTest.php @@ -129,6 +129,7 @@ public function testRemoveRecursive(LoopInterface $loop, FilesystemInterface $fi /** * @dataProvider filesystemProvider + * @group permissions */ public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem) { @@ -152,6 +153,7 @@ public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem) /** * @dataProvider filesystemProvider + * @group permissions */ public function testChmodRecursive(LoopInterface $loop, FilesystemInterface $filesystem) { @@ -175,6 +177,7 @@ public function testChmodRecursive(LoopInterface $loop, FilesystemInterface $fil /** * @dataProvider filesystemProvider + * @group permissions */ public function testChown(LoopInterface $loop, FilesystemInterface $filesystem) { @@ -196,6 +199,7 @@ public function testChown(LoopInterface $loop, FilesystemInterface $filesystem) /** * @dataProvider filesystemProvider + * @group permissions */ public function testChownRecursive(LoopInterface $loop, FilesystemInterface $filesystem) { diff --git a/tests/Adapters/FileTest.php b/tests/Adapters/FileTest.php index 76da248b..541b51c8 100644 --- a/tests/Adapters/FileTest.php +++ b/tests/Adapters/FileTest.php @@ -205,6 +205,7 @@ public function testCopyToDirectory(LoopInterface $loop, FilesystemInterface $fi /** * @dataProvider filesystemProvider + * @group permissions */ public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem) { @@ -222,6 +223,7 @@ public function testChmod(LoopInterface $loop, FilesystemInterface $filesystem) /** * @dataProvider filesystemProvider + * @group permissions */ public function testChownUid(LoopInterface $loop, FilesystemInterface $filesystem) {