|
@@ 798-805 (lines=8) @@
|
| 795 |
|
$this->assertDataSetsEqual($expectedDataSet, $dataSet); |
| 796 |
|
} |
| 797 |
|
|
| 798 |
|
public function testDeleteWithChildrenRoot() |
| 799 |
|
{ |
| 800 |
|
$this->assertEquals(40, Node::findOne(1)->deleteWithChildren()); |
| 801 |
|
|
| 802 |
|
$dataSet = $this->getConnection()->createDataSet(['tree']); |
| 803 |
|
$expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-with-children-root.php')); |
| 804 |
|
$this->assertDataSetsEqual($expectedDataSet, $dataSet); |
| 805 |
|
} |
| 806 |
|
|
| 807 |
|
public function testDeleteWithChildrenRootJoin() |
| 808 |
|
{ |
|
@@ 807-814 (lines=8) @@
|
| 804 |
|
$this->assertDataSetsEqual($expectedDataSet, $dataSet); |
| 805 |
|
} |
| 806 |
|
|
| 807 |
|
public function testDeleteWithChildrenRootJoin() |
| 808 |
|
{ |
| 809 |
|
$this->assertEquals(21, NodeJoin::findOne(41)->deleteWithChildren()); |
| 810 |
|
|
| 811 |
|
$dataSet = $this->getConnection()->createDataSet(['tree']); |
| 812 |
|
$expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-with-children-root-join.php')); |
| 813 |
|
$this->assertDataSetsEqual($expectedDataSet, $dataSet); |
| 814 |
|
} |
| 815 |
|
|
| 816 |
|
/** |
| 817 |
|
* @expectedException \yii\base\Exception |