1*123bc813SAndreas Gohr<?php 2*123bc813SAndreas Gohr/** 3*123bc813SAndreas Gohr * General tests for the styling plugin 4*123bc813SAndreas Gohr * 5*123bc813SAndreas Gohr * @group plugin_styling 6*123bc813SAndreas Gohr * @group plugins 7*123bc813SAndreas Gohr */ 8*123bc813SAndreas Gohrclass general_plugin_styling_test extends DokuWikiTest { 9*123bc813SAndreas Gohr 10*123bc813SAndreas Gohr /** 11*123bc813SAndreas Gohr * Simple test to make sure the plugin.info.txt is in correct format 12*123bc813SAndreas Gohr */ 13*123bc813SAndreas Gohr public function test_plugininfo() { 14*123bc813SAndreas Gohr $file = __DIR__.'/../plugin.info.txt'; 15*123bc813SAndreas Gohr $this->assertFileExists($file); 16*123bc813SAndreas Gohr 17*123bc813SAndreas Gohr $info = confToHash($file); 18*123bc813SAndreas Gohr 19*123bc813SAndreas Gohr $this->assertArrayHasKey('base', $info); 20*123bc813SAndreas Gohr $this->assertArrayHasKey('author', $info); 21*123bc813SAndreas Gohr $this->assertArrayHasKey('email', $info); 22*123bc813SAndreas Gohr $this->assertArrayHasKey('date', $info); 23*123bc813SAndreas Gohr $this->assertArrayHasKey('name', $info); 24*123bc813SAndreas Gohr $this->assertArrayHasKey('desc', $info); 25*123bc813SAndreas Gohr $this->assertArrayHasKey('url', $info); 26*123bc813SAndreas Gohr 27*123bc813SAndreas Gohr $this->assertEquals('styling', $info['base']); 28*123bc813SAndreas Gohr $this->assertRegExp('/^https?:\/\//', $info['url']); 29*123bc813SAndreas Gohr $this->assertTrue(mail_isvalid($info['email'])); 30*123bc813SAndreas Gohr $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); 31*123bc813SAndreas Gohr $this->assertTrue(false !== strtotime($info['date'])); 32*123bc813SAndreas Gohr } 33*123bc813SAndreas Gohr} 34