Skip to content

Commit 8f28388

Browse files
committed
Add functional tests for travis
1 parent 0179269 commit 8f28388

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

phpunit.xml.dist

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="true"
4+
backupStaticAttributes="true"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
verbose="true"
13+
bootstrap="../../../../tests/bootstrap.php"
14+
>
15+
<testsuites>
16+
<testsuite name="Extension Test Suite">
17+
<directory suffix="_test.php">./tests</directory>
18+
<exclude>./tests/functional</exclude>
19+
</testsuite>
20+
<testsuite name="Extension Functional Tests">
21+
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">./tests/functional/</directory>
22+
</testsuite>
23+
</testsuites>
24+
25+
<filter>
26+
<blacklist>
27+
<directory>./tests/</directory>
28+
</blacklist>
29+
<whitelist processUncoveredFilesFromWhitelist="true">
30+
<directory suffix=".php">./</directory>
31+
<exclude>
32+
<directory suffix=".php">./language/</directory>
33+
<directory suffix=".php">./migrations/</directory>
34+
<directory suffix=".php">./tests/</directory>
35+
</exclude>
36+
</whitelist>
37+
</filter>
38+
</phpunit>

tests/functional/install_test.php

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/**
4+
*
5+
* @package phpBB.de Pastebin
6+
* @copyright (c) 2014 phpBB.de
7+
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8+
*
9+
*/
10+
11+
namespace phpbbde\externalimgaslink\tests\functional;
12+
13+
/**
14+
* @group functional
15+
*/
16+
class install_test extends \phpbb_functional_test_case
17+
{
18+
static protected function setup_extensions()
19+
{
20+
return array('phpbbde/externalimgaslink');
21+
}
22+
23+
public function test_validate_externalimgaslink()
24+
{
25+
$crawler = self::request('GET', 'viewtopic.php?t=1');
26+
$this->assertContains('phpBB3', $crawler->filter('h3')->text());
27+
}
28+
}

0 commit comments

Comments
 (0)