Latest updates from IceHrmPro
This commit is contained in:
@@ -28,7 +28,9 @@ class ApprovalStatusIntegration extends \TestTemplate
|
||||
$emp->approver1 = $ids[4];
|
||||
$emp->approver2 = $ids[5];
|
||||
$emp->approver3 = $ids[6];
|
||||
$ok = $emp->Save();
|
||||
$emp->Save();
|
||||
|
||||
|
||||
|
||||
$this->travelRec = new EmployeeTravelRecord();
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Thilina
|
||||
* Date: 9/17/17
|
||||
* Time: 7:06 PM
|
||||
*/
|
||||
|
||||
namespace Test\Integration;
|
||||
|
||||
use Classes\Migration\MigrationManager;
|
||||
use Model\Migration;
|
||||
|
||||
class MigrationManagerIntegration extends \TestTemplate
|
||||
{
|
||||
/* @var MigrationManager $migrationManager */
|
||||
private $migrationManager;
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->migrationManager = new MigrationManager();
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$migration = new Migration();
|
||||
$migration->file = 'migration'.$i;
|
||||
$migration->version = '190000';
|
||||
$migration->created = date("Y-m-d H:i:s", intval(time()) - 10 * $i);
|
||||
$migration->updated = date("Y-m-d H:i:s", intval(time()) - 10 * $i);
|
||||
$migration->status = 'Pending';
|
||||
$migration->Save();
|
||||
}
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
$migration = new Migration();
|
||||
$migration->DB()->execute("delete from Migrations");
|
||||
}
|
||||
|
||||
public function testGetCurrentMigrations()
|
||||
{
|
||||
$migrations = $this->migrationManager->getCurrentMigrations();
|
||||
self::assertEquals(5, count($migrations));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user