Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
shanliu committed Sep 21, 2019
1 parent 49c6955 commit 50a0a0f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
37 changes: 21 additions & 16 deletions tests/classes/TestLSYSEntity/EntityTest71.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<?php
namespace TestLSYSEntity;
use PHPUnit\Framework\TestCase;
use TestLSYSEntityLib\DomeModelTest;
use LSYS\Entity;
class EntityTest71 extends TestCase
{
public function testColumn(){
$model1=new DomeModelTest();
$e=new Entity($model1);
$e->name="fff";
$e->values(array(
"name"=>"temp"
));
$e->asArray();
}
<?php
namespace TestLSYSEntity;
use PHPUnit\Framework\TestCase;
use TestLSYSEntityLib\DomeModelTest;
use LSYS\Entity;
class EntityTest71 extends TestCase
{
public function testEntityPkArrChange()
{
$model1=new DomeModelTestPkArr();
$e=new Entity($model1);
$e->id=rand(300,5000);
$e->code=uniqid("code_");
$e->name="ddddddddddddddd";
$e->enname="ddddddddddddddd";
$e->save();
$this->assertTrue($e->saved());
$e->enname="dddddddddd";
$e->save();
$this->assertTrue($e->saved());
}
}
2 changes: 1 addition & 1 deletion tests/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<phpunit bootstrap="autoload.php">
<testsuites>
<testsuite name="LSYS Tests">
<directory suffix="Test.php">./classes/TestLSYSEntity</directory>
<directory suffix="Test71.php">./classes/TestLSYSEntity</directory>
</testsuite>
</testsuites>
<filter>
Expand Down

0 comments on commit 50a0a0f

Please sign in to comment.