Skip to content

Commit

Permalink
updated tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
anderly committed Mar 13, 2019
1 parent b05d1af commit 1edf270
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/Transformable.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<?php

namespace SaintSystems\Eloquent\Transformable;
Expand Down
14 changes: 7 additions & 7 deletions tests/TransformableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function test_desired_database_model_where_id()
{
$desiredBuilder = DesiredDatabaseModel::where('id', 1);

$expected = 'select * from "tbl_Database_Table" where "PK_Database_ID" = ?';
$expected = 'select * from "tbl_Database_Table" where "tbl_Database_Table"."PK_Database_ID" = ?';
$actual = $desiredBuilder->toSql();

//$this->addWarning($actual);
Expand All @@ -72,7 +72,7 @@ public function test_desired_database_model_where_id_magic_method()
{
$desiredBuilder = DesiredDatabaseModel::whereId(1);

$expected = 'select * from "tbl_Database_Table" where "PK_Database_ID" = ?';
$expected = 'select * from "tbl_Database_Table" where "tbl_Database_Table"."PK_Database_ID" = ?';
$actual = $desiredBuilder->toSql();

//$this->addWarning($actual);
Expand All @@ -85,7 +85,7 @@ public function test_desired_database_model_compound_where()
{
$desiredBuilder = DesiredDatabaseModel::where('id', 1)->orWhere('name', 'Name');

$expected = 'select * from "tbl_Database_Table" where "PK_Database_ID" = ? or "DB_Name" = ?';
$expected = 'select * from "tbl_Database_Table" where "tbl_Database_Table"."PK_Database_ID" = ? or "tbl_Database_Table"."DB_Name" = ?';
$actual = $desiredBuilder->toSql();

// $this->addWarning($actual);
Expand All @@ -98,7 +98,7 @@ public function test_desired_database_model_compound_where_name_magic_method()
{
$desiredBuilder = DesiredDatabaseModel::whereName('Name');

$expected = 'select * from "tbl_Database_Table" where "DB_Name" = ?';
$expected = 'select * from "tbl_Database_Table" where "tbl_Database_Table"."DB_Name" = ?';
$actual = $desiredBuilder->toSql();

// $this->addWarning($actual);
Expand All @@ -111,7 +111,7 @@ public function test_desired_database_model_order_by_name()
{
$desiredBuilder = DesiredDatabaseModel::orderBy('name');

$expected = 'select * from "tbl_Database_Table" order by "DB_Name" asc';
$expected = 'select * from "tbl_Database_Table" order by "tbl_Database_Table"."DB_Name" asc';
$actual = $desiredBuilder->toSql();

// $this->addWarning($actual);
Expand All @@ -124,7 +124,7 @@ public function test_desired_database_model_order_by_name_desc()
{
$desiredBuilder = DesiredDatabaseModel::orderBy('name','desc');

$expected = 'select * from "tbl_Database_Table" order by "DB_Name" desc';
$expected = 'select * from "tbl_Database_Table" order by "tbl_Database_Table"."DB_Name" desc';
$actual = $desiredBuilder->toSql();

// $this->addWarning($actual);
Expand All @@ -137,7 +137,7 @@ public function test_desired_database_model_order_by_name_and_id()
{
$desiredBuilder = DesiredDatabaseModel::orderBy('name')->orderBy('id');

$expected = 'select * from "tbl_Database_Table" order by "DB_Name" asc, "PK_Database_ID" asc';
$expected = 'select * from "tbl_Database_Table" order by "tbl_Database_Table"."DB_Name" asc, "tbl_Database_Table"."PK_Database_ID" asc';
$actual = $desiredBuilder->toSql();

// $this->addWarning($actual);
Expand Down

0 comments on commit 1edf270

Please sign in to comment.