Skip to content

Commit 806e6fd

Browse files
committed
Merge pull request #2 from totten/futurefirst-4.6-list-single-json
CRM-17385 - CRM_Extension_BrowserTest
2 parents 61c87cc + 929dd36 commit 806e6fd

File tree

4 files changed

+6
-23
lines changed

4 files changed

+6
-23
lines changed

tests/phpunit/CRM/Extension/BrowserTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ public function testDisabled() {
2222
}
2323

2424
public function testCheckRequirements_BadCachedir_false() {
25-
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', FALSE);
25+
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, FALSE);
2626
$this->assertEquals(TRUE, $browser->isEnabled());
2727
$reqs = $browser->checkRequirements();
2828
$this->assertEquals(1, count($reqs));
2929
}
3030

3131
public function testCheckRequirements_BadCachedir_nonexistent() {
32-
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', '/tot/all/yin/v/alid');
32+
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, '/tot/all/yin/v/alid');
3333
$this->assertEquals(TRUE, $browser->isEnabled());
3434
$reqs = $browser->checkRequirements();
3535
$this->assertEquals(1, count($reqs));
3636
}
3737

3838
public function testGetExtensions_good() {
39-
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
39+
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, $this->createTempDir('ext-cache-'));
4040
$this->assertEquals(TRUE, $browser->isEnabled());
4141
$this->assertEquals(array(), $browser->checkRequirements());
4242
$exts = $browser->getExtensions();
@@ -50,7 +50,7 @@ public function testGetExtensions_good() {
5050
}
5151

5252
public function testGetExtension_good() {
53-
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
53+
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, $this->createTempDir('ext-cache-'));
5454
$this->assertEquals(TRUE, $browser->isEnabled());
5555
$this->assertEquals(array(), $browser->checkRequirements());
5656

@@ -60,7 +60,7 @@ public function testGetExtension_good() {
6060
}
6161

6262
public function testGetExtension_nonexistent() {
63-
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', '/index.html', $this->createTempDir('ext-cache-'));
63+
$browser = new CRM_Extension_Browser('file://' . dirname(__FILE__) . '/dataset/good-repository', NULL, $this->createTempDir('ext-cache-'));
6464
$this->assertEquals(TRUE, $browser->isEnabled());
6565
$this->assertEquals(array(), $browser->checkRequirements());
6666

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"test.crm.extension.browsertest.a":"<extension key='test.crm.extension.browsertest.a' type='report'>\n <file>main<\/file>\n <name>test_crm_extension_browsertest_a<\/name>\n <description>Brought to you by the letter \"A\"<\/description>\n <version>0.1<\/version>\n <downloadUrl>http:\/\/example.com\/test.crm.extension.browsertest.a-0.1.zip<\/downloadUrl>\n <typeInfo>\n <reportUrl>test\/extension\/browsertest\/a<\/reportUrl>\n <component>CiviContribute<\/component>\n <\/typeInfo>\n<\/extension>\n","test.crm.extension.browsertest.b":"<extension key='test.crm.extension.browsertest.b' type='module'>\n <file>moduletest<\/file>\n <name>test_crm_extension_browsertest_b<\/name>\n <version>1.2<\/version>\n <downloadUrl>http:\/\/example.com\/test.crm.extension.browsertest.b-1.2.zip<\/downloadUrl>\n <description>Brought to you by the letter \"B\"<\/description>\n<\/extension>\n"}

tests/phpunit/CRM/Extension/dataset/good-repository/test.crm.extension.browsertest.a.xml

-11
This file was deleted.

tests/phpunit/CRM/Extension/dataset/good-repository/test.crm.extension.browsertest.b.xml

-7
This file was deleted.

0 commit comments

Comments
 (0)