<?php
/*
+--------------------------------------------------------------------+
-| CiviCRM version 5 |
-+--------------------------------------------------------------------+
-| Copyright CiviCRM LLC (c) 2004-2019 |
-+--------------------------------------------------------------------+
-| This file is a part of CiviCRM. |
-| |
-| CiviCRM is free software; you can copy, modify, and distribute it |
-| under the terms of the GNU Affero General Public License |
-| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
-| |
-| CiviCRM is distributed in the hope that it will be useful, but |
-| WITHOUT ANY WARRANTY; without even the implied warranty of |
-| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
-| See the GNU Affero General Public License for more details. |
-| |
-| You should have received a copy of the GNU Affero General Public |
-| License and the CiviCRM Licensing Exception along |
-| with this program; if not, contact CiviCRM LLC |
-| at info[AT]civicrm[DOT]org. If you have questions about the |
-| GNU Affero General Public License or the licensing of CiviCRM, |
-| see the CiviCRM license FAQ at http://civicrm.org/licensing |
-+--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC. All rights reserved. |
+ | |
+ | This work is published under the GNU AGPLv3 license with some |
+ | permitted exceptions and without any warranty. For full license |
+ | and copyright information, see https://civicrm.org/licensing |
+ +--------------------------------------------------------------------+
*/
/**
public function testFindBaseDirName_normal() {
$this->_doFindBaseDirName('author-com.example.foo-random/',
- array('author-com.example.foo-random'),
- array('author-com.example.foo-random/README.txt' => 'hello')
+ ['author-com.example.foo-random'],
+ ['author-com.example.foo-random/README.txt' => 'hello']
);
}
public function testFindBaseDirName_0() {
$this->_doFindBaseDirName('0/',
- array('0'),
- array()
+ ['0'],
+ []
);
}
public function testFindBaseDirName_plainfile() {
$this->_doFindBaseDirName(FALSE,
- array(),
- array('README.txt' => 'hello')
+ [],
+ ['README.txt' => 'hello']
);
}
public function testFindBaseDirName_twodir() {
$this->_doFindBaseDirName(FALSE,
- array('dir-1', 'dir-2'),
- array('dir-1/README.txt' => 'hello')
+ ['dir-1', 'dir-2'],
+ ['dir-1/README.txt' => 'hello']
);
}
public function testFindBaseDirName_dirfile() {
$this->_doFindBaseDirName(FALSE,
- array('dir-1'),
- array('dir-1/README.txt' => 'hello', 'MANIFEST.MF' => 'extra')
+ ['dir-1'],
+ ['dir-1/README.txt' => 'hello', 'MANIFEST.MF' => 'extra']
);
}
public function testFindBaseDirName_dot() {
$this->_doFindBaseDirName(FALSE,
- array('.'),
- array('./README.txt' => 'hello')
+ ['.'],
+ ['./README.txt' => 'hello']
);
}
public function testFindBaseDirName_dots() {
$this->_doFindBaseDirName(FALSE,
- array('..'),
- array('../README.txt' => 'hello')
+ ['..'],
+ ['../README.txt' => 'hello']
);
}
public function testFindBaseDirName_weird() {
$this->_doFindBaseDirName(FALSE,
- array('foo/../'),
- array('foo/../README.txt' => 'hello')
+ ['foo/../'],
+ ['foo/../README.txt' => 'hello']
);
}
public function testGuessBaseDir_normal() {
$this->_doGuessBaseDir('author-com.example.foo-random',
- array('author-com.example.foo-random'),
- array('author-com.example.foo-random/README.txt' => 'hello'),
+ ['author-com.example.foo-random'],
+ ['author-com.example.foo-random/README.txt' => 'hello'],
'com.example.foo'
);
}
public function testGuessBaseDir_MACOSX() {
$this->_doGuessBaseDir('com.example.foo',
- array('com.example.foo', '__MACOSX'),
- array('author-com.example.foo-random/README.txt' => 'hello', '__MACOSX/foo' => 'bar'),
+ ['com.example.foo', '__MACOSX'],
+ ['author-com.example.foo-random/README.txt' => 'hello', '__MACOSX/foo' => 'bar'],
'com.example.foo'
);
}
public function testGuessBaseDir_0() {
$this->_doGuessBaseDir('0',
- array('0'),
- array(),
+ ['0'],
+ [],
'com.example.foo'
);
}
public function testGuessBaseDir_plainfile() {
$this->_doGuessBaseDir(FALSE,
- array(),
- array('README.txt' => 'hello'),
+ [],
+ ['README.txt' => 'hello'],
'com.example.foo'
);
}
public function testGuessBaseDirTwoDir() {
$this->_doGuessBaseDir(FALSE,
- array('dir-1', 'dir-2'),
- array('dir-1/README.txt' => 'hello'),
+ ['dir-1', 'dir-2'],
+ ['dir-1/README.txt' => 'hello'],
'com.example.foo'
);
}
public function testGuessBaseDirWeird() {
$this->_doGuessBaseDir(FALSE,
- array('foo/../'),
- array('foo/../README.txt' => 'hello'),
+ ['foo/../'],
+ ['foo/../README.txt' => 'hello'],
'com.example.foo'
);
}