1
0
Fork 0
mirror of https://github.com/Oreolek/yii2-nested-sets.git synced 2024-06-26 03:30:46 +03:00

Added new cases to unit tests

This commit is contained in:
Alexander Kochetov 2015-01-03 09:33:49 +03:00
parent c344ebc5b3
commit 1dd0740aa2

View file

@ -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