public function setUp() { parent::setUp(); Session::destroy(); $user = new User('Nathan', '*****@*****.**'); $user->password = '******'; $user->passwordConfirmation = 'nathan'; $key = $user->save(); $user->password = ''; $user->passwordConfirmation = ''; $user->unlock($key); $user->save(); $session = new UserSession('a', 'b'); $session->delete(); // Ugly trick to clear the user session cache }
public function setUp() { parent::setUp(); I18n::setLanguage(''); Session::destroy(); if ($s = UserSession::get()) { $s->delete(); } Session::$site = 'http://www.test.info/'; Session::$referrer = 'http://www.test.info/some/part/of/the/site'; unlink(COORG_TEST_CONFIG); copy(COORG_TEST_CONFIG_CLEAN, COORG_TEST_CONFIG); $config = new Config(COORG_TEST_CONFIG); $config->set('site/title', 'The Site'); $config->set('defaultLanguage', ''); CoOrg::init($config, 'app', 'plugins'); CoOrgSmarty::clearAll(); Header::$redirect = '__none__'; }
public function setUp() { parent::setUp(); $tag = new Tagging; $tag->title = 'Some Title'; $tag->language = 'en'; $tag->body = 'Some Very Long body.'; $tag->save(); $tag->tag('Gamma'); $tag->tag('Alpha'); $tag->tag('Beta'); $tag = new Tagging; $tag->title = 'Some Other Title'; $tag->language = 'en'; $tag->body = 'Some Very short body.'; $tag->save(); $tag->tag('Aay'); $tag->tag('Bee'); $tag->tag('Cee'); }
public function tearDown() { DB::rollback(); parent::tearDown(); self::$_oldDataset = $this->_dataset; }
public function setUp() { parent::setUp(); MockExtends::$before = false; MockExtends::$class = ''; }
public function setUp() { parent::setUp(); $bar = new SearchBar; $bar->title = 'Bar Title'; $bar->someOtherPrimary = 'The Primary'; $bar->body = 'Lorem Ipsum'; $bar->language = 'en'; $bar->save(); $bar = new SearchBar; $bar->title = 'Other Bar Title'; $bar->someOtherPrimary = 'The Primary'; $bar->body = 'Lorem Ipsum Dolor Sit Amet and more latin'; $bar->language = 'en'; $bar->save(); $foo = new SearchFoo; $foo->title = 'My Title'; $foo->someOtherPrimary = 'other-primary'; $foo->datePrimary = '2010-01-01'; $foo->body = 'Somewhere over the rainbow goes, tudeludoedoe <bold>This is some text that has to be searched</bold>'; $foo->barTitle = 'Bar Title'; $foo->barSomeOtherPrimary = 'The Primary'; $foo->identity = 'Keep Me As I am'; $foo->language = 'en'; $foo->save(); $foo = new SearchFoo; $foo->title = 'My Title'; $foo->someOtherPrimary = 'primary'; $foo->datePrimary = '2010-06-01'; $foo->body = 'Lorem Ipsum Dolor Sit Amet Title is very important. So I put title here so its very high up into the list.'; $foo->language = 'en'; $foo->identity = 'kEEP me'; $foo->save(); $foo = new SearchFoo; $foo->title = 'My Other Title'; $foo->someOtherPrimary = 'primary'; $foo->datePrimary = '2010-08-01'; $foo->body = 'Aleia iacta est is not the title'; $foo->language = 'en'; $foo->save(); $foo = new SearchFoo; $foo->title = 'Mijn andere titel'; $foo->someOtherPrimary = 'primary'; $foo->datePrimary = '2010-09-01'; $foo->body = 'Dit is mijn nederlandse tekst, om te zien of het goed werkt. Put some english here (title) so it matches with title, but not when searching for english texts...'; $foo->language = 'nl'; $foo->save(); $isa = new SearchFooISA; $isa->title = 'Some Dodo'; $isa->someOtherPrimary = 'some-primary'; $isa->datePrimary = '2010-11-01'; $isa->body = 'I want you to search this ISA for me...'; $isa->language = 'en'; $isa->someISAVar = '...'; $isa->otherVar = 10; $isa->save(); }