mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
New unit tests to cover missed methods.
This commit is contained in:
40
tests/unit/AccountTest.php
Normal file
40
tests/unit/AccountTest.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
use League\FactoryMuffin\Facade as f;
|
||||
|
||||
/**
|
||||
* Class AccountTest
|
||||
*/
|
||||
class AccountTest extends TestCase
|
||||
{
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function tearDown()
|
||||
{
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
// tests
|
||||
|
||||
public function testAccountMeta()
|
||||
{
|
||||
$account = f::create('Account');
|
||||
$newMeta = $account->updateMeta('field', 'value');
|
||||
$this->assertInstanceOf('AccountMeta', $newMeta);
|
||||
$secondMeta = $account->updateMeta('field', 'newValue');
|
||||
$this->assertEquals($newMeta->id, $secondMeta->id);
|
||||
$this->assertEquals($newMeta->data, 'value');
|
||||
$this->assertEquals($secondMeta->data, 'newValue');
|
||||
}
|
||||
|
||||
public function testAccountUser()
|
||||
{
|
||||
$account = f::create('Account');
|
||||
$this->assertInstanceOf('Account', $account);
|
||||
$this->assertInstanceOf('User', $account->user);
|
||||
}
|
||||
|
||||
}
|
18
tests/unit/ExamplATest.php
Normal file
18
tests/unit/ExamplATest.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
class ExamplATest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
// tests
|
||||
public function testMe()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user