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