Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Friedman <[email protected]>
  • Loading branch information
iMattPro committed Jun 16, 2022
1 parent 10f4a51 commit 959d18d
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tests/ext_test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/**
*
* Advertisement management. An extension for the phpBB Forum Software package.
*
* @copyright (c) 2022 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace phpbb\ads\tests;

class ext_test extends \phpbb_test_case
{
public function test_ext()
{
/** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\DependencyInjection\ContainerInterface */
$container = $this->getMockBuilder('\Symfony\Component\DependencyInjection\ContainerInterface')
->disableOriginalConstructor()
->getMock();

/** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\finder */
$extension_finder = $this->getMockBuilder('\phpbb\finder')
->disableOriginalConstructor()
->getMock();

/** @var \PHPUnit\Framework\MockObject\MockObject|\phpbb\db\migrator */
$migrator = $this->getMockBuilder('\phpbb\db\migrator')
->disableOriginalConstructor()
->getMock();

$ext = new \phpbb\ads\ext(
$container,
$extension_finder,
$migrator,
'phpbb/ads',
''
);

self::assertTrue($ext->is_enableable());
}
}

0 comments on commit 959d18d

Please sign in to comment.