|
@@ 818-825 (lines=8) @@
|
| 815 |
|
$this->assertDataSetsEqual($expectedDataSet, $dataSet); |
| 816 |
|
} |
| 817 |
|
|
| 818 |
|
public function testDeleteWithChildrenRoot() |
| 819 |
|
{ |
| 820 |
|
$this->assertEquals(40, Node::findOne(1)->deleteWithChildren()); |
| 821 |
|
|
| 822 |
|
$dataSet = $this->getConnection()->createDataSet(['tree']); |
| 823 |
|
$expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-with-children-root.php')); |
| 824 |
|
$this->assertDataSetsEqual($expectedDataSet, $dataSet); |
| 825 |
|
} |
| 826 |
|
|
| 827 |
|
public function testDeleteWithChildrenRootJoin() |
| 828 |
|
{ |
|
@@ 827-834 (lines=8) @@
|
| 824 |
|
$this->assertDataSetsEqual($expectedDataSet, $dataSet); |
| 825 |
|
} |
| 826 |
|
|
| 827 |
|
public function testDeleteWithChildrenRootJoin() |
| 828 |
|
{ |
| 829 |
|
$this->assertEquals(21, NodeJoin::findOne(41)->deleteWithChildren()); |
| 830 |
|
|
| 831 |
|
$dataSet = $this->getConnection()->createDataSet(['tree']); |
| 832 |
|
$expectedDataSet = new ArrayDataSet(require(__DIR__ . '/data/test-delete-with-children-root-join.php')); |
| 833 |
|
$this->assertDataSetsEqual($expectedDataSet, $dataSet); |
| 834 |
|
} |
| 835 |
|
|
| 836 |
|
/** |
| 837 |
|
* @expectedException \yii\base\Exception |