public function setUp()
 {
     parent::setUp();
     $this->loadSchemaJSON('schema1');
     $this->loadSchemaJSON('schema2', 'schema2int');
     $this->saveData('page01', 'schema1', array('first' => 'first data', 'second' => array('second data', 'more data', 'even more'), 'third' => 'third data', 'fourth' => 'fourth data'));
 }
 public function setUp()
 {
     parent::setUp();
     /** @var \helper_plugin_struct_db $sqlite */
     $sqlite = plugin_load('helper', 'struct_db');
     $this->sqlite = $sqlite->getDB();
 }
 protected function tearDown()
 {
     parent::tearDown();
     /** @var \helper_plugin_struct_db $sqlite */
     $sqlite = plugin_load('helper', 'struct_db');
     $sqlite->resetDB();
 }
 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('tag');
     $this->waitForTick();
     $this->saveData('page1', 'tag', array('tag' => 'Aragorn', 'tags' => array('Faramir', 'Gollum')));
     $this->saveData('page2', 'tag', array('tag' => 'Eldarion', 'tags' => array('Saruman', 'Arwen')));
     $this->waitForTick();
     $this->saveData('page1', 'tag', array('tag' => 'Treebeard', 'tags' => array('Frodo', 'Arwen')));
 }
 public function setUp()
 {
     parent::setUp();
     saveWikiText('syntax', 'dummy', 'test');
     // make sure the search index is initialized
     idx_addPage('wiki:syntax');
     idx_addPage('syntax');
     idx_addPage('wiki:welcome');
     idx_addPage('wiki:dokuwiki');
 }
 public function setUp()
 {
     parent::setUp();
     /** @var \helper_plugin_struct_db $sqlite */
     $sqlite = plugin_load('helper', 'struct_db');
     $this->sqlite = $sqlite->getDB();
     $this->loadSchemaJSON('testtable', '', 100);
     // revision 1
     $this->saveData('testpage', 'testtable', array('testcolumn' => 'value1', 'testMulitColumn' => array('value2.1', 'value2.2')), 123);
     // revision 2
     $this->saveData('testpage', 'testtable', array('testcolumn' => 'value1a', 'testMulitColumn' => array('value2.1a', 'value2.2a')), 789);
     // revision 1 of different page
     $this->saveData('testpage2', 'testtable', array('testcolumn' => 'value1a', 'testMulitColumn' => array('value2.1a')), 789);
 }
 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();
     $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');
     }
 }
Пример #10
0
 public function setUp()
 {
     parent::setUp();
     $this->loadSchemaJSON('schema1');
 }