recreate project

This commit is contained in:
root
2026-02-10 22:11:06 -05:00
commit 663c0cdbda
10149 changed files with 1379710 additions and 0 deletions
@@ -0,0 +1,40 @@
<?php
namespace Tests\App\Models;
use Tests\Support\DBReset;
use CodeIgniter\Test\CIUnitTestCase;
use App\Models\PaymentTransactionModel;
class PaymentTransactionModelTest extends CIUnitTestCase
{
protected function setUp(): void
{
parent::setUp();
DBReset::resetDatabase();
}
public function testCanInsertAndRetrieve()
{
$record = fake(PaymentTransactionModel::class);
$this->assertNotNull($record->id);
$fetched = (new PaymentTransactionModel())->find($record->id);
$this->assertEquals($record->id, $fetched->id);
}
public function testCanUpdate()
{
$record = fake(PaymentTransactionModel::class);
$model = new PaymentTransactionModel();
$model->update($record->id, ['updated_at' => date('Y-m-d H:i:s')]);
$this->assertTrue(true); // simple test to verify no exception thrown
}
public function testCanDelete()
{
$record = fake(PaymentTransactionModel::class);
$model = new PaymentTransactionModel();
$model->delete($record->id);
$this->assertNull($model->find($record->id));
}
}