CakeAccounting/tests/TestCase/Model/Table/DeAccountStatementsTableTes...

94 lines
2.4 KiB
PHP

<?php
declare(strict_types=1);
namespace CakeAccounting\Test\TestCase\Model\Table;
use Cake\TestSuite\TestCase;
use CakeAccounting\Model\Table\DeAccountStatementsTable;
/**
* CakeAccounting\Model\Table\DeAccountStatementsTable Test Case
*/
class DeAccountStatementsTableTest extends TestCase
{
/**
* Test subject
*
* @var \CakeAccounting\Model\Table\DeAccountStatementsTable
*/
protected $DeAccountStatements;
/**
* Fixtures
*
* @var array<string>
*/
protected array $fixtures = [
'plugin.CakeAccounting.DeAccountStatements',
];
/**
* setUp method
*
* @return void
*/
protected function setUp(): void
{
parent::setUp();
$config = $this->getTableLocator()->exists('DeAccountStatements') ? [] : ['className' => DeAccountStatementsTable::class];
$this->DeAccountStatements = $this->getTableLocator()->get('DeAccountStatements', $config);
}
/**
* tearDown method
*
* @return void
*/
protected function tearDown(): void
{
unset($this->DeAccountStatements);
parent::tearDown();
}
/**
* TestInitialize method
*
* @return void
* @uses \CakeAccounting\Model\Table\DeAccountStatementsTable::initialize()
*/
public function testInitialize(): void
{
// verify all associations loaded
$expectedAssociations = [
'DeAccounts',
];
$associations = $this->DeAccountStatements->associations();
$this->assertCount(count($expectedAssociations), $associations);
foreach ($expectedAssociations as $expectedAssociation) {
$this->assertTrue($this->DeAccountStatements->hasAssociation($expectedAssociation));
}
// verify all behaviors loaded
$expectedBehaviors = [];
$behaviors = $this->DeAccountStatements->behaviors();
$this->assertCount(count($expectedBehaviors), $behaviors);
foreach ($expectedBehaviors as $expectedBehavior) {
$this->assertTrue($this->DeAccountStatements->hasBehavior($expectedBehavior));
}
}
/**
* Test validationDefault method
*
* @return void
* @uses \CakeAccounting\Model\Table\DeAccountStatementsTable::validationDefault()
*/
public function testValidationDefault(): void
{
$this->markTestIncomplete('Not implemented yet.');
}
}