浏览代码

First batch of changes updating schema use to match the new API.

Piotrek Koszuliński 8 年之前
父节点
当前提交
cc55a2f6c7
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      packages/ckeditor5-undo/tests/undoengine-integration.js

+ 3 - 3
packages/ckeditor5-undo/tests/undoengine-integration.js

@@ -39,7 +39,7 @@ describe( 'UndoEngine integration', () => {
 				doc = model.document;
 
 				// Add "div feature".
-				model.schema.registerItem( 'div', '$block' );
+				model.schema.register( 'div', { inheritAllFrom: '$block' } );
 				buildModelConverter().for( editor.data.modelToView, editor.editing.modelToView ).fromElement( 'div' ).toElement( 'div' );
 				buildViewConverter().for( editor.data.viewToModel ).fromElement( 'div' ).toElement( 'div' );
 
@@ -338,7 +338,7 @@ describe( 'UndoEngine integration', () => {
 
 	describe( 'wrapping, unwrapping, merging, splitting', () => {
 		it( 'wrap and undo', () => {
-			model.schema.allow( { name: '$text', inside: '$root' } );
+			model.schema.extend( '$text', { allowIn: '$root' } );
 			input( 'fo[zb]ar' );
 
 			model.change( writer => {
@@ -353,7 +353,7 @@ describe( 'UndoEngine integration', () => {
 		} );
 
 		it( 'wrap, move and undo', () => {
-			model.schema.allow( { name: '$text', inside: '$root' } );
+			model.schema.extend( '$text', { allowIn: '$root' } );
 			input( 'fo[zb]ar' );
 
 			model.change( writer => {