/** * @expectedException \yii\db\Exception */ public function testMakeRootNewExceptionIsRaisedWhenTreeAttributeIsFalseAndRootIsExists() { $node = new Tree(['name' => 'Root']); $node->makeRoot(); }