[feature/tests] Add extension-testframework from phpBB gallery

This commit is contained in:
Marc Alexander
2013-10-29 15:02:51 +01:00
parent e3fb1073be
commit d757d7396d
33 changed files with 14630 additions and 3 deletions

View File

@@ -0,0 +1,34 @@
<?php
/**
*
* @package phpBB Gallery Testing
* @copyright (c) 2013 nickvergessen
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace phpbbgallery\core\tests\systemtests;
class base_database_test extends \phpbbgallery\core\tests\testframework\database_test_case
{
public function getDataSet()
{
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/basetests.xml');
}
public function test_check()
{
$sql = 'SELECT session_user_id, album_name
FROM phpbb_sessions s
LEFT JOIN phpbb_gallery_albums a
ON (s.session_album_id = a.album_id)';
$result = $this->db->sql_query($sql);
$this->assertEquals(array(
array(
'session_user_id' => 4,
'album_name' => 'Testalbum',
),
), $this->db->sql_fetchrowset($result));
$this->db->sql_freeresult($result);
}
}