Skip to content

Commit b1cc35f

Browse files
committed
Fix controller that was renamed
1 parent 3ffc5ba commit b1cc35f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

tests/functional/demo_test.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@ static protected function setup_extensions()
1919
return array('acme/demo');
2020
}
2121

22+
protected $controller;
23+
24+
public function setUp(): void
25+
{
26+
parent::setUp();
27+
$this->controller = phpbb_version_compare(PHPBB_VERSION, '4.0.0-a1', '>=') ? 'index' : 'app';
28+
}
29+
2230
public function test_demo_acme()
2331
{
24-
$crawler = self::request('GET', 'app.php/demo/acme');
32+
$crawler = self::request('GET', $this->controller . '.php/demo/acme');
2533
$this->assertStringContainsString('acme', $crawler->filter('h2')->text());
2634

2735
$this->add_lang_ext('acme/demo', 'common');
@@ -33,7 +41,7 @@ public function test_demo_acme()
3341

3442
public function test_demo_world()
3543
{
36-
$crawler = self::request('GET', 'app.php/demo/world');
44+
$crawler = self::request('GET', $this->controller . '.php/demo/world');
3745
$this->assertStringNotContainsString('acme', $crawler->filter('h2')->text());
3846
$this->assertStringContainsString('world', $crawler->filter('h2')->text());
3947
}

0 commit comments

Comments
 (0)