mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Removed LEGACY check from tests.
This commit is contained in:
@@ -6,6 +6,7 @@ paths:
|
|||||||
envs: tests/_envs
|
envs: tests/_envs
|
||||||
actor_suffix: Tester
|
actor_suffix: Tester
|
||||||
settings:
|
settings:
|
||||||
|
shuffle: true
|
||||||
bootstrap: _bootstrap.php
|
bootstrap: _bootstrap.php
|
||||||
coverage:
|
coverage:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
2
e107
2
e107
Submodule e107 updated: f5f2212b54...a8d1541b9d
@@ -356,6 +356,12 @@
|
|||||||
unset($actual[$unimportant_key]);
|
unset($actual[$unimportant_key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filter out cruft from e_LEGACY_MODE database output
|
||||||
|
foreach ($actual as $key => $value)
|
||||||
|
{
|
||||||
|
if (is_int($key)) unset($actual[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
$this->assertEquals($expected,$actual);
|
$this->assertEquals($expected,$actual);
|
||||||
|
|
||||||
$status = $this->ep->XmlSiteLinks('uninstall',$plugVars);
|
$status = $this->ep->XmlSiteLinks('uninstall',$plugVars);
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
$this->fail("Couldn't load e_db_mysql object");
|
$this->fail("Couldn't load e_db_mysql object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define('e_LEGACY_MODE', true);
|
||||||
$this->db->__construct();
|
$this->db->__construct();
|
||||||
$this->loadConfig();
|
$this->loadConfig();
|
||||||
|
|
||||||
@@ -184,7 +185,8 @@
|
|||||||
'dblog_user_id' => '1',
|
'dblog_user_id' => '1',
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertEquals($data, $expected);
|
|
||||||
|
$this->assertEquals($expected, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -304,8 +306,10 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->db->insert('generic', $insert);
|
$this->db->insert('generic', $insert);
|
||||||
$actual = $this->db->lastInsertId();
|
$first = $this->db->lastInsertId();
|
||||||
$this->assertEquals(2,$actual);
|
$this->db->insert('generic', $insert);
|
||||||
|
$next = $this->db->lastInsertId();
|
||||||
|
$this->assertEquals(1, $next - $first);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +504,6 @@
|
|||||||
$check = (strpos($row[1], "CREATE TABLE `e107_user`") !== false);
|
$check = (strpos($row[1], "CREATE TABLE `e107_user`") !== false);
|
||||||
$this->assertTrue($check);
|
$this->assertTrue($check);
|
||||||
/*
|
/*
|
||||||
define('e_LEGACY_MODE', true);
|
|
||||||
$this->db->select('user', '*', 'user_id = 1');
|
$this->db->select('user', '*', 'user_id = 1');
|
||||||
$row = $this->db->db_Fetch();
|
$row = $this->db->db_Fetch();
|
||||||
$this->assertEquals("e107", $row['user_name']);
|
$this->assertEquals("e107", $row['user_name']);
|
||||||
@@ -770,8 +773,13 @@
|
|||||||
|
|
||||||
public function testDb_CopyRow()
|
public function testDb_CopyRow()
|
||||||
{
|
{
|
||||||
$result = $this->db->db_CopyRow('news', '*', "news_id = 1");
|
$count_args = ['news', '(*)', ''];
|
||||||
$this->assertGreaterThan(1,$result);
|
$copy_args = ['news', '*', 'news_id = 1'];
|
||||||
|
|
||||||
|
$initial_count = $this->db->count(...$count_args);
|
||||||
|
$this->db->db_CopyRow(...$copy_args);
|
||||||
|
$next_count = $this->db->count(...$count_args);
|
||||||
|
$this->assertEquals(1, $next_count - $initial_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDb_CopyTable()
|
public function testDb_CopyTable()
|
||||||
@@ -937,6 +945,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->assertEquals('test_id', $res[0], print_r($res,true));
|
$this->assertEquals('test_id', $res[0], print_r($res,true));
|
||||||
|
|
||||||
if(!$tabs = $xql->tables())
|
if(!$tabs = $xql->tables())
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
$this->fail("Couldn't load e_db_pdo object");
|
$this->fail("Couldn't load e_db_pdo object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define('e_LEGACY_MODE', true);
|
||||||
$this->db->__construct();
|
$this->db->__construct();
|
||||||
$this->loadConfig();
|
$this->loadConfig();
|
||||||
|
|
||||||
@@ -527,7 +527,6 @@
|
|||||||
$check = (strpos($row[1], "CREATE TABLE `e107_user`") !== false);
|
$check = (strpos($row[1], "CREATE TABLE `e107_user`") !== false);
|
||||||
$this->assertTrue($check);
|
$this->assertTrue($check);
|
||||||
|
|
||||||
define('e_LEGACY_MODE', true);
|
|
||||||
$this->db->select('user', '*', 'user_id = 1');
|
$this->db->select('user', '*', 'user_id = 1');
|
||||||
$row = $this->db->db_Fetch();
|
$row = $this->db->db_Fetch();
|
||||||
$this->assertEquals("e107", $row['user_name']);
|
$this->assertEquals("e107", $row['user_name']);
|
||||||
|
Reference in New Issue
Block a user