mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-15 12:16:27 +00:00
commit
71691fe44a
5 changed files with 67 additions and 31 deletions
14
.travis.yml
14
.travis.yml
|
@ -1,6 +1,18 @@
|
||||||
language: php
|
language: php
|
||||||
|
|
||||||
php:
|
php:
|
||||||
|
- 5.4
|
||||||
- 5.5
|
- 5.5
|
||||||
|
- 5.6
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- refactor
|
- refactor
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- composer self-update
|
||||||
|
- echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ant -f app/build.xml prepare
|
||||||
|
- phpunit -c app --coverage-text
|
||||||
|
|
22
app/build.xml
Normal file
22
app/build.xml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project name="wallabag" default="build">
|
||||||
|
<target name="build" depends="prepare"/>
|
||||||
|
|
||||||
|
<target name="clean" description="Cleanup build artifacts">
|
||||||
|
<delete dir="${basedir}/app/cache"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="prepare" depends="clean" description="Prepare for build">
|
||||||
|
<exec executable="composer">
|
||||||
|
<arg value="install"/>
|
||||||
|
<arg value="--dev"/>
|
||||||
|
<arg value="--no-interaction"/>
|
||||||
|
<arg value="--working-dir=.."/>
|
||||||
|
</exec>
|
||||||
|
<exec executable="php">
|
||||||
|
<arg value="${basedir}/../app/console"/>
|
||||||
|
<arg value="cache:clear"/>
|
||||||
|
<arg value="--env=test"/>
|
||||||
|
</exec>
|
||||||
|
</target>
|
||||||
|
</project>
|
31
app/phpunit.xml.dist
Normal file
31
app/phpunit.xml.dist
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
syntaxCheck="false"
|
||||||
|
bootstrap="bootstrap.php.cache"
|
||||||
|
>
|
||||||
|
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="wallabag Test Suite">
|
||||||
|
<directory>../src/Wallabag/CoreBundle/Tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory>../src</directory>
|
||||||
|
<exclude>
|
||||||
|
<directory>../vendor</directory>
|
||||||
|
<directory>../src/Acme</directory>
|
||||||
|
<directory>../src/AppBundle</directory>
|
||||||
|
</exclude>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
</phpunit>
|
|
@ -1,28 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
|
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
|
|
||||||
backupGlobals="false"
|
|
||||||
colors="true"
|
|
||||||
>
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="wallabag Test Suite">
|
|
||||||
<directory>src/Wallabag/*Bundle/Tests</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
|
|
||||||
<filter>
|
|
||||||
<whitelist>
|
|
||||||
<directory>src</directory>
|
|
||||||
<exclude>
|
|
||||||
<directory>src/*Bundle/Resources</directory>
|
|
||||||
<directory>src/*Bundle/Tests</directory>
|
|
||||||
<directory>src/*/*Bundle/Resources</directory>
|
|
||||||
<directory>src/*/*Bundle/Tests</directory>
|
|
||||||
<directory>src/*/Bundle/*Bundle/Resources</directory>
|
|
||||||
<directory>src/*/Bundle/*Bundle/Tests</directory>
|
|
||||||
</exclude>
|
|
||||||
</whitelist>
|
|
||||||
</filter>
|
|
||||||
</phpunit>
|
|
|
@ -10,9 +10,8 @@ class EntryControllerTest extends WebTestCase
|
||||||
{
|
{
|
||||||
$client = static::createClient();
|
$client = static::createClient();
|
||||||
|
|
||||||
$crawler = $client->request('GET', '/app/index');
|
$crawler = $client->request('GET', '/new');
|
||||||
|
|
||||||
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
$this->assertEquals(200, $client->getResponse()->getStatusCode());
|
||||||
$this->assertTrue($crawler->filter('html:contains("Homepage")')->count() > 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue