diff --git a/tests/phpunit/CRM/Extension/BrowserTest.php b/tests/phpunit/CRM/Extension/BrowserTest.php index 811d5f1cbffc..e739aa92bbb1 100644 --- a/tests/phpunit/CRM/Extension/BrowserTest.php +++ b/tests/phpunit/CRM/Extension/BrowserTest.php @@ -22,21 +22,21 @@ public function testDisabled() { } public function testCheckRequirements_BadCachedir_false() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', FALSE); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, FALSE); $this->assertEquals(TRUE, $browser->isEnabled()); $reqs = $browser->checkRequirements(); $this->assertEquals(1, count($reqs)); } public function testCheckRequirements_BadCachedir_nonexistent() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', '/tot/all/yin/v/alid'); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, '/tot/all/yin/v/alid'); $this->assertEquals(TRUE, $browser->isEnabled()); $reqs = $browser->checkRequirements(); $this->assertEquals(1, count($reqs)); } public function testGetExtensions_good() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, $this->createTempDir('ext-cache-')); $this->assertEquals(TRUE, $browser->isEnabled()); $this->assertEquals(array(), $browser->checkRequirements()); $exts = $browser->getExtensions(); @@ -50,7 +50,7 @@ public function testGetExtensions_good() { } public function testGetExtension_good() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, $this->createTempDir('ext-cache-')); $this->assertEquals(TRUE, $browser->isEnabled()); $this->assertEquals(array(), $browser->checkRequirements()); @@ -60,7 +60,7 @@ public function testGetExtension_good() { } public function testGetExtension_nonexistent() { - $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-')); + $browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, $this->createTempDir('ext-cache-')); $this->assertEquals(TRUE, $browser->isEnabled()); $this->assertEquals(array(), $browser->checkRequirements()); diff --git a/tests/phpunit/CRM/Extension/dataset/good-repository/single b/tests/phpunit/CRM/Extension/dataset/good-repository/single new file mode 100644 index 000000000000..35c7f95bbd5b --- /dev/null +++ b/tests/phpunit/CRM/Extension/dataset/good-repository/single @@ -0,0 +1 @@ +{"test.crm.extension.browsertest.a":"\n main<\/file>\n test_crm_extension_browsertest_a<\/name>\n Brought to you by the letter \"A\"<\/description>\n 0.1<\/version>\n http:\/\/example.com\/test.crm.extension.browsertest.a-0.1.zip<\/downloadUrl>\n \n test\/extension\/browsertest\/a<\/reportUrl>\n CiviContribute<\/component>\n <\/typeInfo>\n<\/extension>\n","test.crm.extension.browsertest.b":"\n moduletest<\/file>\n test_crm_extension_browsertest_b<\/name>\n 1.2<\/version>\n http:\/\/example.com\/test.crm.extension.browsertest.b-1.2.zip<\/downloadUrl>\n Brought to you by the letter \"B\"<\/description>\n<\/extension>\n"} \ No newline at end of file diff --git a/tests/phpunit/CRM/Extension/dataset/good-repository/test.crm.extension.browsertest.a.xml b/tests/phpunit/CRM/Extension/dataset/good-repository/test.crm.extension.browsertest.a.xml deleted file mode 100644 index 4898b996abe8..000000000000 --- a/tests/phpunit/CRM/Extension/dataset/good-repository/test.crm.extension.browsertest.a.xml +++ /dev/null @@ -1,11 +0,0 @@ - - main - test_crm_extension_browsertest_a - Brought to you by the letter "A" - 0.1 - http://example.com/test.crm.extension.browsertest.a-0.1.zip - - test/extension/browsertest/a - CiviContribute - - diff --git a/tests/phpunit/CRM/Extension/dataset/good-repository/test.crm.extension.browsertest.b.xml b/tests/phpunit/CRM/Extension/dataset/good-repository/test.crm.extension.browsertest.b.xml deleted file mode 100644 index bdd2fddf91c4..000000000000 --- a/tests/phpunit/CRM/Extension/dataset/good-repository/test.crm.extension.browsertest.b.xml +++ /dev/null @@ -1,7 +0,0 @@ - - moduletest - test_crm_extension_browsertest_b - 1.2 - http://example.com/test.crm.extension.browsertest.b-1.2.zip - Brought to you by the letter "B" -