[Pkg-owncloud-commits] [php-sabredav] 24/34: Fixing CS for some more unittests.

David Prévot taffit at moszumanska.debian.org
Wed May 27 13:57:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag 3.0.0-beta1
in repository php-sabredav.

commit 4e64167c999b011f39feda234e9572762a656e3d
Author: Evert Pot <me at evertpot.com>
Date:   Mon May 25 18:34:04 2015 -0400

    Fixing CS for some more unittests.
---
 tests/Sabre/DAVACL/Xml/Property/ACLTest.php        | 32 +++++++++++-----------
 .../Xml/Property/CurrentUserPrivilegeSetTest.php   |  3 +-
 tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php  |  8 +++---
 .../Xml/Property/SupportedPrivilegeSetTest.php     | 12 ++++----
 4 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/tests/Sabre/DAVACL/Xml/Property/ACLTest.php b/tests/Sabre/DAVACL/Xml/Property/ACLTest.php
index 2375857..0d15147 100644
--- a/tests/Sabre/DAVACL/Xml/Property/ACLTest.php
+++ b/tests/Sabre/DAVACL/Xml/Property/ACLTest.php
@@ -10,14 +10,14 @@ class ACLTest extends \PHPUnit_Framework_TestCase {
 
     function testConstruct() {
 
-        $acl = new Acl(array());
+        $acl = new Acl([]);
         $this->assertInstanceOf('Sabre\DAVACL\Xml\Property\ACL', $acl);
 
     }
 
     function testSerializeEmpty() {
 
-        $acl = new Acl(array());
+        $acl = new Acl([]);
         $xml = (new DAV\Server())->xml->write('{DAV:}root', $acl);
 
         $expected = '<?xml version="1.0"?>
@@ -75,21 +75,21 @@ class ACLTest extends \PHPUnit_Framework_TestCase {
 
     function testSerializeSpecialPrincipals() {
 
-        $privileges = array(
-            array(
+        $privileges = [
+            [
                 'principal' => '{DAV:}authenticated',
                 'privilege' => '{DAV:}write',
-            ),
-            array(
+            ],
+            [
                 'principal' => '{DAV:}unauthenticated',
                 'privilege' => '{DAV:}write',
-            ),
-            array(
+            ],
+            [
                 'principal' => '{DAV:}all',
                 'privilege' => '{DAV:}write',
-            ),
+            ],
 
-        );
+        ];
 
         $acl = new Acl($privileges);
         $xml = (new DAV\Server())->xml->write('{DAV:}root', $acl, '/');
@@ -169,18 +169,18 @@ class ACLTest extends \PHPUnit_Framework_TestCase {
 
         $this->assertInstanceOf('Sabre\\DAVACL\\Xml\\Property\\Acl', $result);
 
-        $expected = array(
-            array(
+        $expected = [
+            [
                 'principal' => '/principals/evert/',
                 'protected' => false,
                 'privilege' => '{DAV:}write',
-            ),
-            array(
+            ],
+            [
                 'principal' => '/principals/foo/',
                 'protected' => true,
                 'privilege' => '{DAV:}read',
-            ),
-        );
+            ],
+        ];
 
         $this->assertEquals($expected, $result->getPrivileges());
 
diff --git a/tests/Sabre/DAVACL/Xml/Property/CurrentUserPrivilegeSetTest.php b/tests/Sabre/DAVACL/Xml/Property/CurrentUserPrivilegeSetTest.php
index 7a7141d..d6e6b2d 100644
--- a/tests/Sabre/DAVACL/Xml/Property/CurrentUserPrivilegeSetTest.php
+++ b/tests/Sabre/DAVACL/Xml/Property/CurrentUserPrivilegeSetTest.php
@@ -7,12 +7,11 @@ use Sabre\DAV\Browser\HtmlOutputHelper;
 use Sabre\HTTP;
 use Sabre\Xml\Reader;
 
-
 class CurrentUserPrivilegeSetTest extends \PHPUnit_Framework_TestCase {
 
     function testSerialize() {
 
-        $privileges = [ 
+        $privileges = [
             '{DAV:}read',
             '{DAV:}write',
         ];
diff --git a/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php b/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php
index d201499..876d107 100644
--- a/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php
+++ b/tests/Sabre/DAVACL/Xml/Property/PrincipalTest.php
@@ -19,9 +19,9 @@ class PrincipalTest extends \PHPUnit_Framework_TestCase {
         $this->assertEquals(Principal::AUTHENTICATED, $principal->getType());
         $this->assertNull($principal->getHref());
 
-        $principal = new Principal(Principal::HREF,'admin');
+        $principal = new Principal(Principal::HREF, 'admin');
         $this->assertEquals(Principal::HREF, $principal->getType());
-        $this->assertEquals('admin/',$principal->getHref());
+        $this->assertEquals('admin/', $principal->getHref());
 
     }
 
@@ -73,7 +73,7 @@ class PrincipalTest extends \PHPUnit_Framework_TestCase {
      */
     function testSerializeHref() {
 
-        $prin = new Principal(Principal::HREF,'principals/admin');
+        $prin = new Principal(Principal::HREF, 'principals/admin');
         $xml = (new DAV\Server())->xml->write('{DAV:}principal', $prin, '/');
 
         $this->assertXmlStringEqualsXmlString('
@@ -150,7 +150,7 @@ class PrincipalTest extends \PHPUnit_Framework_TestCase {
      */
     function testToHtml($principal, $output) {
 
-        $html = $principal->toHtml(new HtmlOutputHelper('/',[]));
+        $html = $principal->toHtml(new HtmlOutputHelper('/', []));
 
         $this->assertXmlStringEqualsXmlString(
             $output,
diff --git a/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php b/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php
index 46b8ba6..07f407c 100644
--- a/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php
+++ b/tests/Sabre/DAVACL/Xml/Property/SupportedPrivilegeSetTest.php
@@ -46,14 +46,14 @@ class SupportedPrivilegeSetTest extends \PHPUnit_Framework_TestCase {
     function testSerializeAggregate() {
 
         $prop = new SupportedPrivilegeSet([
-            'privilege' => '{DAV:}all',
-            'abstract'  => true,
+            'privilege'  => '{DAV:}all',
+            'abstract'   => true,
             'aggregates' => [
                 [
                     'privilege' => '{DAV:}read',
                 ],
                 [
-                    'privilege' => '{DAV:}write',
+                    'privilege'   => '{DAV:}write',
                     'description' => 'booh',
                 ],
             ],
@@ -87,14 +87,14 @@ class SupportedPrivilegeSetTest extends \PHPUnit_Framework_TestCase {
     function testToHtml() {
 
         $prop = new SupportedPrivilegeSet([
-            'privilege' => '{DAV:}all',
-            'abstract'  => true,
+            'privilege'  => '{DAV:}all',
+            'abstract'   => true,
             'aggregates' => [
                 [
                     'privilege' => '{DAV:}read',
                 ],
                 [
-                    'privilege' => '{DAV:}write',
+                    'privilege'   => '{DAV:}write',
                     'description' => 'booh',
                 ],
             ],

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list