]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Tests are working again 1035/head
authorJeremy <jeremy.benoist@gmail.com>
Sat, 31 Jan 2015 08:15:51 +0000 (09:15 +0100)
committerJeremy <jeremy.benoist@gmail.com>
Sat, 31 Jan 2015 08:35:50 +0000 (09:35 +0100)
.travis.yml
app/build.xml [new file with mode: 0644]
app/phpunit.xml.dist
src/Wallabag/CoreBundle/Tests/Controller/EntryControllerTest.php

index 2971c5b9e8ba4cbf636465375ad2808570df56c2..1d90a7489b738ed7351f5ca2a3a4a58c7b2ece7b 100644 (file)
@@ -1,6 +1,18 @@
 language: php
+
 php:
+  - 5.4
   - 5.5
+  - 5.6
+
 branches:
   only:
-    - refactor
\ No newline at end of file
+    - 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
diff --git a/app/build.xml b/app/build.xml
new file mode 100644 (file)
index 0000000..16ef73e
--- /dev/null
@@ -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>
index 0be14ca954950b591be5192b8f388439654b7aed..6593a2f06e2ce3a57281c74f2130e2bc7193775e 100644 (file)
@@ -1,12 +1,17 @@
 <?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"
+<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>
index af20f31f10208ab8c723ba80592c6444289a1371..786ff811795bca28005c8c41ff110f6762d48df0 100644 (file)
@@ -10,9 +10,8 @@ class EntryControllerTest extends WebTestCase
     {
         $client = static::createClient();
 
-        $crawler = $client->request('GET', '/app/index');
+        $crawler = $client->request('GET', '/new');
 
         $this->assertEquals(200, $client->getResponse()->getStatusCode());
-        $this->assertTrue($crawler->filter('html:contains("Homepage")')->count() > 0);
     }
 }