mirror of
https://github.com/Karaka-Management/oms-Accounting.git
synced 2026-02-01 14:08:40 +00:00
remove some getter/setter
This commit is contained in:
parent
389d8b04f4
commit
f16b953d1c
|
|
@ -46,7 +46,7 @@ class Balance
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $name = '';
|
||||
public string $name = '';
|
||||
|
||||
/**
|
||||
* Balance description.
|
||||
|
|
@ -68,32 +68,6 @@ class Balance
|
|||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name Balance name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName(string $name) : void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getName() : string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set description
|
||||
*
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class CostCenter
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $code = '';
|
||||
public string $code = '';
|
||||
|
||||
/**
|
||||
* Localization.
|
||||
|
|
@ -46,7 +46,7 @@ class CostCenter
|
|||
* @var L11nCostCenter
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private L11nCostCenter $l11n;
|
||||
public L11nCostCenter $l11n;
|
||||
|
||||
/**
|
||||
* Parent.
|
||||
|
|
@ -54,7 +54,7 @@ class CostCenter
|
|||
* @var null|int|CostCenter
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $parent = null;
|
||||
public $parent = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
@ -77,108 +77,4 @@ class CostCenter
|
|||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set code
|
||||
*
|
||||
* @param string $code Balance code
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCode(string $code) : void
|
||||
{
|
||||
$this->code = $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get code
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getCode() : string
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name Balance name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName(string $name) : void
|
||||
{
|
||||
$this->l11n->setName($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getName() : string
|
||||
{
|
||||
return $this->l11n->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set description
|
||||
*
|
||||
* @param string $description Balance description
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDescription(string $description) : void
|
||||
{
|
||||
$this->l11n->setDescription($description);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get description
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getDescription() : string
|
||||
{
|
||||
return $this->l11n->getDescription();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set parent
|
||||
*
|
||||
* @param null|int|CostCenter $parent Parent
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setParent($parent) : void
|
||||
{
|
||||
$this->parent = $parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parent
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
return $this->parent;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class CostObject
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $code = '';
|
||||
public string $code = '';
|
||||
|
||||
/**
|
||||
* Localization.
|
||||
|
|
@ -46,7 +46,7 @@ class CostObject
|
|||
* @var L11nCostObject
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private L11nCostObject $l11n;
|
||||
public L11nCostObject $l11n;
|
||||
|
||||
/**
|
||||
* Parent.
|
||||
|
|
@ -54,7 +54,7 @@ class CostObject
|
|||
* @var null|int|CostObject
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private $parent = null;
|
||||
public $parent = null;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
@ -77,108 +77,4 @@ class CostObject
|
|||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set code
|
||||
*
|
||||
* @param string $code Balance code
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCode(string $code) : void
|
||||
{
|
||||
$this->code = $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get code
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getCode() : string
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name Balance name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName(string $name) : void
|
||||
{
|
||||
$this->l11n->setName($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getName() : string
|
||||
{
|
||||
return $this->l11n->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set description
|
||||
*
|
||||
* @param string $description Balance description
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDescription(string $description) : void
|
||||
{
|
||||
$this->l11n->setDescription($description);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get description
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getDescription() : string
|
||||
{
|
||||
return $this->l11n->getDescription();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set parent
|
||||
*
|
||||
* @param null|int|CostObject $parent Parent
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setParent($parent) : void
|
||||
{
|
||||
$this->parent = $parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parent
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getParent()
|
||||
{
|
||||
return $this->parent;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class L11nCostCenter implements \JsonSerializable, ArrayableInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $name = '';
|
||||
public string $name = '';
|
||||
|
||||
/**
|
||||
* Description.
|
||||
|
|
@ -65,7 +65,7 @@ class L11nCostCenter implements \JsonSerializable, ArrayableInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $description = '';
|
||||
public string $description = '';
|
||||
|
||||
/**
|
||||
* Get id
|
||||
|
|
@ -131,58 +131,6 @@ class L11nCostCenter implements \JsonSerializable, ArrayableInterface
|
|||
$this->language = $language;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get costcenter name.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getName() : string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name Name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName(string $name) : void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get costcenter description.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getDescription() : string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set description
|
||||
*
|
||||
* @param string $description Description
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDescription(string $description) : void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class L11nCostObject implements \JsonSerializable, ArrayableInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $name = '';
|
||||
public string $name = '';
|
||||
|
||||
/**
|
||||
* Description.
|
||||
|
|
@ -65,7 +65,7 @@ class L11nCostObject implements \JsonSerializable, ArrayableInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $description = '';
|
||||
public string $description = '';
|
||||
|
||||
/**
|
||||
* Get id
|
||||
|
|
@ -131,58 +131,6 @@ class L11nCostObject implements \JsonSerializable, ArrayableInterface
|
|||
$this->language = $language;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get costobject name.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getName() : string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name
|
||||
*
|
||||
* @param string $name Name
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setName(string $name) : void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get costobject description.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function getDescription() : string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set description
|
||||
*
|
||||
* @param string $description Description
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setDescription(string $description) : void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$url = UriFactory::build('{/prefix}tag/single?{?}&id=' . $value->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('Code'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCode()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$url = UriFactory::build('{/prefix}tag/single?{?}&id=' . $value->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('Code'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCode()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($count === 0) : ?>
|
||||
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}admin/group/settings?{?}&id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
|
||||
<td>
|
||||
<td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -30,17 +30,17 @@ class CostCenterMapperTest extends \PHPUnit\Framework\TestCase
|
|||
public function testCR() : void
|
||||
{
|
||||
$costcenter = new CostCenter();
|
||||
$costcenter->setCode('123');
|
||||
$costcenter->setName('Test CostCenter');
|
||||
$costcenter->setDescription('Test description');
|
||||
$costcenter->code = '123';
|
||||
$costcenter->l11n->name = 'Test CostCenter';
|
||||
$costcenter->l11n->description = 'Test description';
|
||||
|
||||
$id = CostCenterMapper::create($costcenter);
|
||||
self::assertGreaterThan(0, $costcenter->getId());
|
||||
self::assertEquals($id, $costcenter->getId());
|
||||
|
||||
$costcenterR = CostCenterMapper::withConditional('language', ISO639x1Enum::_EN)::get($costcenter->getId());
|
||||
self::assertEquals($costcenter->getCode(), $costcenterR->getCode());
|
||||
self::assertEquals($costcenter->getName(), $costcenterR->getName());
|
||||
self::assertEquals($costcenter->getDescription(), $costcenterR->getDescription());
|
||||
self::assertEquals($costcenter->code, $costcenterR->code);
|
||||
self::assertEquals($costcenter->l11n->name, $costcenterR->l11n->name);
|
||||
self::assertEquals($costcenter->l11n->description, $costcenterR->l11n->description);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
|
|||
$cc = new CostCenter();
|
||||
|
||||
self::assertEquals(0, $cc->getId());
|
||||
self::assertEquals('', $cc->getName());
|
||||
self::assertEquals('', $cc->getCode());
|
||||
self::assertEquals('', $cc->getDescription());
|
||||
self::assertNull($cc->getParent());
|
||||
self::assertEquals('', $cc->l11n->name);
|
||||
self::assertEquals('', $cc->code);
|
||||
self::assertEquals('', $cc->l11n->description);
|
||||
self::assertNull($cc->parent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -44,8 +44,8 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$cc = new CostCenter();
|
||||
|
||||
$cc->setName('TestName');
|
||||
self::assertEquals('TestName', $cc->getName());
|
||||
$cc->l11n->name = 'TestName';
|
||||
self::assertEquals('TestName', $cc->l11n->name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -56,8 +56,8 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$cc = new CostCenter();
|
||||
|
||||
$cc->setCode('TestCode');
|
||||
self::assertEquals('TestCode', $cc->getCode());
|
||||
$cc->code = 'TestCode';
|
||||
self::assertEquals('TestCode', $cc->code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -68,8 +68,8 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$cc = new CostCenter();
|
||||
|
||||
$cc->setDescription('TestDescription');
|
||||
self::assertEquals('TestDescription', $cc->getDescription());
|
||||
$cc->l11n->description = 'TestDescription';
|
||||
self::assertEquals('TestDescription', $cc->l11n->description);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -80,7 +80,7 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$cc = new CostCenter();
|
||||
|
||||
$cc->setParent(1);
|
||||
self::assertEquals(1, $cc->getParent());
|
||||
$cc->parent = 1;
|
||||
self::assertEquals(1, $cc->parent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,17 +30,17 @@ class CostObjectMapperTest extends \PHPUnit\Framework\TestCase
|
|||
public function testCR() : void
|
||||
{
|
||||
$costobject = new CostObject();
|
||||
$costobject->setCode('123');
|
||||
$costobject->setName('Test CostObject');
|
||||
$costobject->setDescription('Test description');
|
||||
$costobject->code = '123';
|
||||
$costobject->l11n->name = 'Test CostObject';
|
||||
$costobject->l11n->description = 'Test description';
|
||||
|
||||
$id = CostObjectMapper::create($costobject);
|
||||
self::assertGreaterThan(0, $costobject->getId());
|
||||
self::assertEquals($id, $costobject->getId());
|
||||
|
||||
$costobjectR = CostObjectMapper::withConditional('language', ISO639x1Enum::_EN)::get($costobject->getId());
|
||||
self::assertEquals($costobject->getCode(), $costobjectR->getCode());
|
||||
self::assertEquals($costobject->getName(), $costobjectR->getName());
|
||||
self::assertEquals($costobject->getDescription(), $costobjectR->getDescription());
|
||||
self::assertEquals($costobject->code, $costobjectR->code);
|
||||
self::assertEquals($costobject->l11n->name, $costobjectR->l11n->name);
|
||||
self::assertEquals($costobject->l11n->description, $costobjectR->l11n->description);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
|
|||
$co = new CostObject();
|
||||
|
||||
self::assertEquals(0, $co->getId());
|
||||
self::assertEquals('', $co->getName());
|
||||
self::assertEquals('', $co->getCode());
|
||||
self::assertEquals('', $co->getDescription());
|
||||
self::assertNull($co->getParent());
|
||||
self::assertEquals('', $co->l11n->name);
|
||||
self::assertEquals('', $co->code);
|
||||
self::assertEquals('', $co->l11n->description);
|
||||
self::assertNull($co->parent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -44,8 +44,8 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$co = new CostObject();
|
||||
|
||||
$co->setName('TestName');
|
||||
self::assertEquals('TestName', $co->getName());
|
||||
$co->l11n->name = 'TestName';
|
||||
self::assertEquals('TestName', $co->l11n->name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -56,8 +56,8 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$co = new CostObject();
|
||||
|
||||
$co->setCode('TestCode');
|
||||
self::assertEquals('TestCode', $co->getCode());
|
||||
$co->code = 'TestCode';
|
||||
self::assertEquals('TestCode', $co->code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -68,8 +68,8 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$co = new CostObject();
|
||||
|
||||
$co->setDescription('TestDescription');
|
||||
self::assertEquals('TestDescription', $co->getDescription());
|
||||
$co->l11n->description = 'TestDescription';
|
||||
self::assertEquals('TestDescription', $co->l11n->description);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -80,7 +80,7 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
|
|||
{
|
||||
$co = new CostObject();
|
||||
|
||||
$co->setParent(1);
|
||||
self::assertEquals(1, $co->getParent());
|
||||
$co->parent = 1;
|
||||
self::assertEquals(1, $co->parent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user