mirror of
https://github.com/Oreolek/yii2-nested-sets.git
synced 2024-06-17 07:10:46 +03:00
Added new cases to unit tests
This commit is contained in:
parent
9ec88f215e
commit
129602a8cc
|
@ -685,6 +685,16 @@ class NestedSetsBehaviorTest extends DatabaseTestCase
|
|||
$node->insert();
|
||||
}
|
||||
|
||||
public function testUpdate()
|
||||
{
|
||||
$dataSet = $this->createFlatXMLDataSet(__DIR__ . '/datasets/tree.xml');
|
||||
$this->getDatabaseTester()->setDataSet($dataSet);
|
||||
$this->getDatabaseTester()->onSetUp();
|
||||
$node = Tree::findOne(9);
|
||||
$node->name = 'Updated node 2';
|
||||
$this->assertEquals(1, $node->update());
|
||||
}
|
||||
|
||||
public function testChildren()
|
||||
{
|
||||
$dataSet = $this->createFlatXMLDataSet(__DIR__ . '/datasets/tree.xml');
|
||||
|
|
Loading…
Reference in a new issue