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()); }
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(); } }
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); } }