예제 #1
0
 function setUp()
 {
     parent::setUp();
     $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
     // Create users.
     $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer blocks', 'administer menu', 'create article content'));
     $this->authenticated_user = $this->drupalCreateUser(array());
 }
예제 #2
0
 protected function setUp()
 {
     parent::setUp();
     $this->drupalLogin($this->drupalCreateUser(array('access administration pages', 'administer menu')));
     // Add some custom languages.
     foreach (array('aa', 'bb', 'cc', 'cs') as $language_code) {
         ConfigurableLanguage::create(array('id' => $language_code, 'label' => $this->randomMachineName()))->save();
     }
 }
예제 #3
0
 function setUp()
 {
     parent::setUp();
     // Create user.
     $this->admin_user = $this->drupalCreateUser(array('access administration pages', 'administer menu'));
     $this->drupalLogin($this->admin_user);
     // Add some custom languages.
     foreach (array('aa', 'bb', 'cc', 'cs') as $language_code) {
         $language = new Language(array('id' => $language_code, 'name' => $this->randomMachineName()));
         language_save($language);
     }
 }