Check all the paths of the module.

@group Quicktabs

Hierarchy

  • class \Drupal\quicktabs\Tests\QuicktabsPathTest extends \Drupal\simpletest\WebTestBase

Expanded class hierarchy of QuicktabsPathTest

Fichier

src/Tests/QuicktabsPathTest.php, line 18

Namespace

Drupal\quicktabs\Tests
View source
class QuicktabsPathTest extends WebTestBase {
    
    /**
     * Modules to enable.
     *
     * @var array
     */
    public static $modules = array(
        'quicktabs',
    );
    
    /**
     * Test user.
     */
    private $admin_user;
    function setUp() {
        parent::setUp();
        $this->admin_user = $this->drupalCreateUser(array(
            'administer quicktabs',
            'access administration pages',
        ));
        $this->drupalLogin($this->admin_user);
    }
    function testQuicktabsPath() {
        $this->drupalLogin($this->admin_user);
        $paths = array(
            'admin/structure/quicktabs',
            'admin/structure/quicktabs/add',
            'admin/structure/quicktabs/list',
        );
        foreach ($paths as $path) {
            $this->drupalGet($path);
            $this->assertResponse(200, '200 response for path: ' . $path);
        }
    }

}

Members