Dblayeroo and Dblayer : {ENGINE} -> ENGINE to be PHP lintable in all the cases
This commit is contained in:
@@ -11,13 +11,13 @@ namespace Domframework\Tests;
|
||||
|
||||
use Domframework\Dblayer;
|
||||
|
||||
class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
class DblayerTestENGINE extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
// Test with column name 'group', 'object', 'where', 'with space'
|
||||
// Test with table name 'group', 'object', 'where', 'with space'
|
||||
// For the 3 DB engines
|
||||
|
||||
public $engine = "{ENGINE}";
|
||||
public $engine = "ENGINE";
|
||||
public $confs = [
|
||||
"sqlite" => [
|
||||
"dsn" => "sqlite:/tmp/databaseDBLayer.db",
|
||||
@@ -47,7 +47,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testDropTable()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -75,7 +75,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
public function testCreateTable1()
|
||||
{
|
||||
// Create a table named grouped
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -99,7 +99,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testInsert1()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -123,7 +123,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testRead1()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -148,7 +148,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testUpdate1()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -170,7 +170,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testRead2()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -195,7 +195,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testUpdate2()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -218,7 +218,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testRead3()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -243,7 +243,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testUpdate3()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -277,7 +277,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
public function testCreateTable2()
|
||||
{
|
||||
// Create a table named group
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -306,7 +306,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testInsert2()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -335,7 +335,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
// Test the unique feature
|
||||
public function testInsert3()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -362,7 +362,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testInsert4()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -395,7 +395,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
// Create a table named group
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -432,7 +432,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
public function testCreateTable3()
|
||||
{
|
||||
// Create a table named group
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -454,7 +454,7 @@ class DblayerTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testReadOR1()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayer(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
|
||||
@@ -11,13 +11,13 @@ namespace Domframework\Tests;
|
||||
|
||||
use Domframework\Dblayeroo;
|
||||
|
||||
class DblayerooTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
class DblayerooTestENGINE extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
// Test with column name 'group', 'object', 'where', 'with space'
|
||||
// Test with table name 'group', 'object', 'where', 'with space'
|
||||
// For the 3 DB engines
|
||||
|
||||
public $engine = "{ENGINE}";
|
||||
public $engine = "ENGINE";
|
||||
public $confs = [
|
||||
"sqlite" => [
|
||||
"dsn" => "sqlite:/tmp/databaseDBLayeroo.db",
|
||||
@@ -44,7 +44,7 @@ class DblayerooTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
private function tbl1()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$tbl1 = new Dblayeroo(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -64,7 +64,7 @@ class DblayerooTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
private function tbl2()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$tbl2 = new Dblayeroo(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -86,7 +86,7 @@ class DblayerooTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
private function tbl3()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$tbl3 = new Dblayeroo(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -98,7 +98,7 @@ class DblayerooTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
private function tbl4()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$tbl4 = new Dblayeroo(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
@@ -119,7 +119,7 @@ class DblayerooTest{ENGINE} extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function testDropTable()
|
||||
{
|
||||
$dbconfig = $this->confs["{ENGINE}"];
|
||||
$dbconfig = $this->confs["ENGINE"];
|
||||
$db = new Dblayeroo(
|
||||
$dbconfig["dsn"],
|
||||
$dbconfig["username"],
|
||||
|
||||
@@ -25,7 +25,7 @@ define("PHPUNIT", "ON-GOING");
|
||||
file_put_contents(
|
||||
"Tests/DblayerooSqliteTest.php",
|
||||
str_replace(
|
||||
"{ENGINE}",
|
||||
"ENGINE",
|
||||
"sqlite",
|
||||
file_get_contents("Tests/DblayerooComplet.php")
|
||||
)
|
||||
@@ -33,7 +33,7 @@ file_put_contents(
|
||||
file_put_contents(
|
||||
"Tests/DblayerooMySQLTest.php",
|
||||
str_replace(
|
||||
"{ENGINE}",
|
||||
"ENGINE",
|
||||
"mysql",
|
||||
file_get_contents("Tests/DblayerooComplet.php")
|
||||
)
|
||||
@@ -41,7 +41,7 @@ file_put_contents(
|
||||
file_put_contents(
|
||||
"Tests/DblayerooPostgreSQLTest.php",
|
||||
str_replace(
|
||||
"{ENGINE}",
|
||||
"ENGINE",
|
||||
"pgsql",
|
||||
file_get_contents("Tests/DblayerooComplet.php")
|
||||
)
|
||||
@@ -49,7 +49,7 @@ file_put_contents(
|
||||
file_put_contents(
|
||||
"Tests/DblayerSqliteTest.php",
|
||||
str_replace(
|
||||
"{ENGINE}",
|
||||
"ENGINE",
|
||||
"sqlite",
|
||||
file_get_contents("Tests/DblayerComplet.php")
|
||||
)
|
||||
@@ -57,7 +57,7 @@ file_put_contents(
|
||||
file_put_contents(
|
||||
"Tests/DblayerMySQLTest.php",
|
||||
str_replace(
|
||||
"{ENGINE}",
|
||||
"ENGINE",
|
||||
"mysql",
|
||||
file_get_contents("Tests/DblayerComplet.php")
|
||||
)
|
||||
@@ -65,7 +65,7 @@ file_put_contents(
|
||||
file_put_contents(
|
||||
"Tests/DblayerPostgreSQLTest.php",
|
||||
str_replace(
|
||||
"{ENGINE}",
|
||||
"ENGINE",
|
||||
"pgsql",
|
||||
file_get_contents("Tests/DblayerComplet.php")
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user