Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/controller/main_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function test_handle($status_code, $page_content)

// Set language->lang() to return any arguments sent to it
$language->method('lang')
->will($this->returnArgument(0));
->willReturnArgument(0);

/** @var \phpbb\controller\helper|\PHPUnit\Framework\MockObject\MockObject $controller_helper Mock the controller helper class */
$controller_helper = $this->getMockBuilder('\phpbb\controller\helper')
Expand Down
5 changes: 3 additions & 2 deletions tests/dbal/simple_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public function test_column()
}
else
{
// This is how to instantiate db_tools in phpBB 3.2
// This is how to instantiate db_tools in phpBB 3.2 and beyond
$factory = new \phpbb\db\tools\factory();
$db_tools = $factory->get($this->db);
$db = method_exists($this, 'new_doctrine_dbal') ? $this->new_doctrine_dbal() : $this->db;
$db_tools = $factory->get($db);
}

$this->assertTrue($db_tools->sql_column_exists(USERS_TABLE, 'user_demo'), 'Asserting that column "user_demo" exists');
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/view_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected static function setup_extensions()
*/
public function test_view_foo()
{
$crawler = self::request('GET', 'app.php/demo/foo');
$crawler = self::request('GET', 'demo/foo');
$this->assertStringContainsString('foo', $crawler->filter('h2')->text());

$this->add_lang_ext('acme/demo', 'common');
Expand All @@ -45,7 +45,7 @@ public function test_view_foo()
*/
public function test_view_bar()
{
$crawler = self::request('GET', 'app.php/demo/bar');
$crawler = self::request('GET', 'demo/bar');
$this->assertStringNotContainsString('foo', $crawler->filter('h2')->text());
$this->assertStringContainsString('bar', $crawler->filter('h2')->text());
}
Expand Down