public function setUp()
 {
     parent::setUp();
     $this->loadSchemaJSON('schema1');
     $this->loadSchemaJSON('schema2');
     $as = new mock\Assignments();
     $as->assignPageSchema('page01', 'schema1');
     $this->saveData('page01', 'schema1', array('first' => 'first data', 'second' => array('second data', 'more data', 'even more'), 'third' => 'third data', 'fourth' => 'fourth data'));
     $as->assignPageSchema('page01', 'schema2');
     $this->saveData('page01', 'schema2', array('afirst' => 'first data', 'asecond' => array('second data', 'more data', 'even more'), 'athird' => 'third data', 'afourth' => 'fourth data'));
     for ($i = 10; $i <= 20; $i++) {
         $as->assignPageSchema("page{$i}", 'schema2');
         $this->saveData("page{$i}", 'schema2', array('afirst' => "page{$i} first data", 'asecond' => array("page{$i} second data"), 'athird' => "page{$i} third data", 'afourth' => "page{$i} fourth data"));
     }
 }
 public function setUp()
 {
     parent::setUp();
     $schemafoo = array();
     $schemafoo['new']['new1']['label'] = 'pages';
     $schemafoo['new']['new1']['ismulti'] = 1;
     $schemafoo['new']['new1']['class'] = 'Page';
     $schemafoo['new']['new1']['isenabled'] = '1';
     $schemabar['new']['new2']['label'] = 'data';
     $schemabar['new']['new2']['ismulti'] = 0;
     $schemabar['new']['new2']['class'] = 'Text';
     $schemabar['new']['new2']['isenabled'] = '1';
     $builder_foo = new meta\SchemaBuilder('foo', $schemafoo);
     $builder_foo->build();
     $builder_bar = new meta\SchemaBuilder('bar', $schemabar);
     $builder_bar->build();
     $as = new mock\Assignments();
     $as->assignPageSchema('start', 'foo');
     $as->assignPageSchema('no:data', 'foo');
     $as->assignPageSchema('page1', 'bar');
     $as->assignPageSchema('page2', 'bar');
     $as->assignPageSchema('page2', 'bar');
     $this->saveData('start', 'foo', array('pages' => array('page1', 'page2')));
     $this->saveData('page1', 'bar', array('data' => 'data of page1'));
     $this->saveData('page2', 'bar', array('data' => 'data of page2'));
 }
 public function setUp()
 {
     parent::setUp();
     $this->loadSchemaJSON('schema1');
     $this->loadSchemaJSON('schema2');
     $as = new mock\Assignments();
     $page = 'page01';
     $as->assignPageSchema($page, 'schema1');
     $as->assignPageSchema($page, 'schema2');
     saveWikiText($page, "===== TestTitle =====\nabc", "Summary");
     p_get_metadata($page);
     $this->saveData($page, 'schema1', array('first' => 'first data', 'second' => array('second data', 'more data', 'even more'), 'third' => 'third data', 'fourth' => 'fourth data'));
     $this->saveData($page, 'schema2', array('afirst' => 'first data', 'asecond' => array('second data', 'more data', 'even more'), 'athird' => 'third data', 'afourth' => 'fourth data'));
     $as->assignPageSchema('test:document', 'schema1');
     $as->assignPageSchema('test:document', 'schema2');
     $this->saveData('test:document', 'schema1', array('first' => 'document first data', 'second' => array('second', 'more'), 'third' => '', 'fourth' => 'fourth data'));
     $this->saveData('test:document', 'schema2', array('afirst' => 'first data', 'asecond' => array('second data', 'more data', 'even more'), 'athird' => 'third data', 'afourth' => 'fourth data'));
     for ($i = 10; $i <= 20; $i++) {
         $this->saveData("page{$i}", 'schema2', array('afirst' => "page{$i} first data", 'asecond' => array("page{$i} second data"), 'athird' => "page{$i} third data", 'afourth' => "page{$i} fourth data"));
         $as->assignPageSchema("page{$i}", 'schema2');
     }
 }