X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FCRM%2FExtension%2FContainer%2FBasicTest.php;h=fd911ed703d789c22d2dd63f79a1fe5a2f7f6d82;hb=b190ef9cca2c2ba0bab7da22a89a6e74395c4502;hp=a568a600b46d6544759dc6704bfac7c1c4b41a4d;hpb=b71cb96619f284fb007d4365c33f59f088573d8f;p=civicrm-core.git diff --git a/tests/phpunit/CRM/Extension/Container/BasicTest.php b/tests/phpunit/CRM/Extension/Container/BasicTest.php index a568a600b4..fd911ed703 100644 --- a/tests/phpunit/CRM/Extension/Container/BasicTest.php +++ b/tests/phpunit/CRM/Extension/Container/BasicTest.php @@ -1,28 +1,28 @@ createTempDir('ext-empty-'); $c = new CRM_Extension_Container_Basic($basedir, 'http://example/basedir', NULL, NULL); - $this->assertEquals($c->getKeys(), array()); + $this->assertEquals($c->getKeys(), []); } public function testGetKeys() { list($basedir, $c) = $this->_createContainer(); - $this->assertEquals($c->getKeys(), array('test.foo', 'test.foo.bar')); + $this->assertEquals($c->getKeys(), ['test.foo', 'test.foo.bar']); } public function testGetPath() { @@ -82,7 +82,7 @@ class CRM_Extension_Container_BasicTest extends CiviUnitTestCase { } public function testCaching() { - $cache = new CRM_Utils_Cache_Arraycache(array()); + $cache = new CRM_Utils_Cache_Arraycache([]); $this->assertTrue(!is_array($cache->get('basic-scan'))); list($basedir, $c) = $this->_createContainer($cache, 'basic-scan'); $this->assertEquals('http://example/basedir/foo', $c->getResUrl('test.foo')); @@ -108,18 +108,18 @@ class CRM_Extension_Container_BasicTest extends CiviUnitTestCase { file_put_contents("$basedir/foo/bar/info.xml", "oddball"); // not needed for now // file_put_contents("$basedir/foo/bar/oddball.php", " 'foo\bar', 'whiz.bang' => 'tests\extensions\whiz\bang', - ); - $expectedRelUrls = array( + ]; + $expectedRelUrls = [ 'foo.bar' => 'foo/bar', 'whiz.bang' => 'tests/extensions/whiz/bang', - ); + ]; $actualRelUrls = CRM_Extension_Container_Basic::convertPathsToUrls('\\', $relPaths); $this->assertEquals($expectedRelUrls, $actualRelUrls); }