Added testing
This commit is contained in:
19
tests/TransactionTest.php
Normal file
19
tests/TransactionTest.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use ProVM\Database\Transaction;
|
||||
|
||||
class TransactionTest extends TestCase
|
||||
{
|
||||
public function testTransaction()
|
||||
{
|
||||
$connection = $this->createMock(ProVM\Concept\Database\Connection::class);
|
||||
$transaction = new Transaction($connection);
|
||||
$transaction->begin();
|
||||
$this->assertTrue(true);
|
||||
$transaction->commit();
|
||||
$this->assertTrue(true);
|
||||
$transaction->begin();
|
||||
$transaction->rollback();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user