diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/avatar/manager_test.php | 20 | ||||
-rw-r--r-- | tests/bbcode/parser_test.php | 2 | ||||
-rw-r--r-- | tests/cache/null_driver_test.php | 6 | ||||
-rw-r--r-- | tests/class_loader/class_loader_test.php | 2 | ||||
-rw-r--r-- | tests/cron/manager_test.php | 2 | ||||
-rw-r--r-- | tests/passwords/drivers_test.php | 2 | ||||
-rw-r--r-- | tests/passwords/manager_test.php | 6 |
7 files changed, 20 insertions, 20 deletions
diff --git a/tests/avatar/manager_test.php b/tests/avatar/manager_test.php index 527bb223d5..69d4280b9a 100644 --- a/tests/avatar/manager_test.php +++ b/tests/avatar/manager_test.php @@ -9,29 +9,33 @@ require_once dirname(__FILE__) . '/driver/foobar.php'; -class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase +class phpbb_avatar_manager_test extends \phpbb_test_case { + /** @var \phpbb\avatar\manager */ + protected $manager; + protected $avatar_foobar; + protected $avatar_barfoo; + public function setUp() { global $phpbb_root_path, $phpEx; // Mock phpbb_container - $this->phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); - $this->phpbb_container->expects($this->any()) + $phpbb_container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface'); + $phpbb_container->expects($this->any()) ->method('get') ->will($this->returnArgument(0)); // Prepare dependencies for avatar manager and driver $config = new \phpbb\config\config(array()); - $request = $this->getMock('\phpbb\request\request'); $cache = $this->getMock('\phpbb\cache\driver\driver_interface'); $path_helper = new \phpbb\path_helper( new \phpbb\symfony_request( new phpbb_mock_request() ), new \phpbb\filesystem(), - $this->phpbb_root_path, - $this->phpEx + $phpbb_root_path, + $phpEx ); // $this->avatar_foobar will be needed later on @@ -60,7 +64,7 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase $config['allow_avatar_' . get_class($this->avatar_barfoo)] = false; // Set up avatar manager - $this->manager = new \phpbb\avatar\manager($config, $avatar_drivers, $this->phpbb_container); + $this->manager = new \phpbb\avatar\manager($config, $avatar_drivers, $phpbb_container); } protected function avatar_drivers() @@ -222,8 +226,6 @@ class phpbb_avatar_manager_test extends PHPUnit_Framework_TestCase */ public function test_clean_row(array $input, array $output, $prefix = '') { - $cleaned_row = array(); - $cleaned_row = \phpbb\avatar\manager::clean_row($input, $prefix); foreach ($output as $key => $value) { diff --git a/tests/bbcode/parser_test.php b/tests/bbcode/parser_test.php index d0dcce5bbf..4bf5037f45 100644 --- a/tests/bbcode/parser_test.php +++ b/tests/bbcode/parser_test.php @@ -12,7 +12,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_content.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/bbcode.php'; require_once dirname(__FILE__) . '/../../phpBB/includes/message_parser.php'; -class phpbb_bbcode_parser_test extends PHPUnit_Framework_TestCase +class phpbb_bbcode_parser_test extends \phpbb_test_case { public function bbcode_firstpass_data() { diff --git a/tests/cache/null_driver_test.php b/tests/cache/null_driver_test.php index 58e57f2b3a..049d0412b6 100644 --- a/tests/cache/null_driver_test.php +++ b/tests/cache/null_driver_test.php @@ -35,14 +35,12 @@ class phpbb_cache_null_driver_test extends phpbb_database_test_case public function test_purge() { - // does nothing - $this->driver->purge(); + $this->assertNull($this->driver->purge()); } public function test_destroy() { - // does nothing - $this->driver->destroy('foo'); + $this->assertNull($this->driver->destroy('foo')); } public function test_cache_sql() diff --git a/tests/class_loader/class_loader_test.php b/tests/class_loader/class_loader_test.php index 6e551f658a..d3c7bb0579 100644 --- a/tests/class_loader/class_loader_test.php +++ b/tests/class_loader/class_loader_test.php @@ -7,7 +7,7 @@ * */ -class phpbb_class_loader_test extends PHPUnit_Framework_TestCase +class phpbb_class_loader_test extends \phpbb_test_case { public function setUp() { diff --git a/tests/cron/manager_test.php b/tests/cron/manager_test.php index 713f44c1e2..937add252f 100644 --- a/tests/cron/manager_test.php +++ b/tests/cron/manager_test.php @@ -14,7 +14,7 @@ require_once dirname(__FILE__) . '/tasks/simple_ready.php'; require_once dirname(__FILE__) . '/tasks/simple_not_runnable.php'; require_once dirname(__FILE__) . '/tasks/simple_should_not_run.php'; -class phpbb_cron_manager_test extends PHPUnit_Framework_TestCase +class phpbb_cron_manager_test extends \phpbb_test_case { public function setUp() { diff --git a/tests/passwords/drivers_test.php b/tests/passwords/drivers_test.php index 40bb110185..df1474419b 100644 --- a/tests/passwords/drivers_test.php +++ b/tests/passwords/drivers_test.php @@ -7,7 +7,7 @@ * */ -class phpbb_passwords_helper_test extends PHPUnit_Framework_TestCase +class phpbb_passwords_helper_test extends \phpbb_test_case { public function setUp() { diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php index 008f222696..561c4d1189 100644 --- a/tests/passwords/manager_test.php +++ b/tests/passwords/manager_test.php @@ -7,7 +7,7 @@ * */ -class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase +class phpbb_passwords_manager_test extends \phpbb_test_case { protected $passwords_drivers; @@ -176,7 +176,7 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase } } - public function test_combined_hash_data() + public function combined_hash_data() { if (version_compare(PHP_VERSION, '5.3.7', '<')) { @@ -242,7 +242,7 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase } /** - * @dataProvider test_combined_hash_data + * @dataProvider combined_hash_data */ public function test_combined_hash_password($first_type, $second_type, $expected = true) { |