Skip to content

Commit

Permalink
[#14733] - Added migrations to the new classes; Corrected project_path
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Feb 8, 2020
1 parent e03565f commit 197eaed
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public function dMPdoConnectionCommitInTransaction(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
(new Invoices($connection));
$migration = new Invoices();
$migration->create($connection);
$connection->beginTransaction();

$I->assertTrue($connection->inTransaction());
Expand Down Expand Up @@ -88,7 +89,8 @@ public function dMPdoConnectionRollBack(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
(new Invoices($connection));
$migration = new Invoices();
$migration->create($connection);
$connection->beginTransaction();

$I->assertTrue($connection->inTransaction());
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/ExecCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionExec(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/FetchAffectedCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionFetchAffected(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/FetchAllCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionFetchAll(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/FetchAssocCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionFetchAssoc(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/FetchColumnCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionFetchCol(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/FetchGroupCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionFetchGroup(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/DM/Pdo/Connection/FetchObjectCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function dMPdoConnectionFetchObject(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down Expand Up @@ -58,7 +59,8 @@ public function connectionFetchObjectCtor(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
6 changes: 4 additions & 2 deletions tests/integration/DM/Pdo/Connection/FetchObjectsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function dMPdoConnectionFetchObjects(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down Expand Up @@ -68,7 +69,8 @@ public function connectionFetchObjectsCtor(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
9 changes: 6 additions & 3 deletions tests/integration/DM/Pdo/Connection/FetchOneCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function dMPdoConnectionFetchOne(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down Expand Up @@ -63,7 +64,8 @@ public function dMPdoConnectionFetchOneNoResult(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down Expand Up @@ -91,7 +93,8 @@ public function dMPdoConnectionFetchOneBindTypes(IntegrationTester $I, Example $

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1, 'test-1');
$I->assertEquals(1, $result);
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/FetchPairsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionFetchPairs(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/FetchValueCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionFetchValue(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/DM/Pdo/Connection/LastInsertIdCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use IntegrationTester;
use Phalcon\DM\Pdo\Connection;

use Phalcon\Test\Fixtures\Migrations\Invoices;
use function date;
use function str_replace;
use function uniqid;
Expand All @@ -31,6 +32,8 @@ public function dMPdoConnectionLastInsertId(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices();
$invoice->create($connection);

$template = 'insert into co_invoices (inv_id, inv_cst_id, inv_status_flag, '
. 'inv_title, inv_total, inv_created_at) values ('
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/DM/Pdo/Connection/QueryCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function dMPdoConnectionQuery(IntegrationTester $I)

/** @var Connection $connection */
$connection = $I->getConnection();
$invoice = new Invoices($connection);
$invoice = new Invoices();
$invoice->create($connection);

$result = $invoice->insert($connection, 1);
$I->assertEquals(1, $result);
Expand Down

0 comments on commit 197eaed

Please sign in to comment.