mirror of
https://github.com/Oreolek/yii2-nested-sets.git
synced 2024-06-29 04:55:00 +03:00
Added new cases to unit tests
This commit is contained in:
parent
c344ebc5b3
commit
1dd0740aa2
|
@ -262,7 +262,13 @@ class NestedSetsBehaviorTest extends DatabaseTestCase
|
|||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$this->markTestSkipped();
|
||||
$dataSet = $this->createFlatXMLDataSet(__DIR__ . '/datasets/tree.xml');
|
||||
$this->getDatabaseTester()->setDataSet($dataSet);
|
||||
$this->getDatabaseTester()->onSetUp();
|
||||
$this->assertEquals(1, Tree::findOne(9)->delete());
|
||||
$dataSet = $this->getConnection()->createDataSet(['tree']);
|
||||
$expectedDataSet = $this->createFlatXMLDataSet(__DIR__ . '/datasets/tree-after-delete.xml');
|
||||
$this->assertDataSetsEqual($expectedDataSet, $dataSet);
|
||||
}
|
||||
|
||||
// @todo: delete exceptions tests here
|
||||
|
|
Loading…
Reference in a new issue