readonlymode.test 850 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. class ReadonlymodeTestCase extends DrupalWebTestCase {
  3. protected $privileged_user;
  4. public static function getInfo() {
  5. // Note that getInfo() strings are not translated with t().
  6. return array(
  7. 'name' => 'Readonly Mode',
  8. 'description' => 'Test cases for read only mode module.',
  9. 'group' => 'Read Only Mode',
  10. );
  11. }
  12. public function setUp() {
  13. parent::setUp('readonlymode');
  14. $this->privileged_user = $this->drupalCreateUser(array('create article content'));
  15. }
  16. function testNodeCreateWhenReadonlymodeDisabled() {
  17. $this->testId = 1;
  18. $this->drupalLogin($this->privileged_user);
  19. $this->drupalGet('node/add/article');
  20. $this->assertResponse('200', 'User can create article');
  21. }
  22. function testSometest(){
  23. $this->testId=2;
  24. $this->assert(true,'This is test message');
  25. }
  26. }