summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-27 20:22:54 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-27 20:22:54 -0400
commitff030d43c34d606b557c6a9a44395b5382172746 (patch)
tree29658a72a7476d9132999258840fb7bffaa3cf5b /tests
parentfe2ddce91420d3649f6abf0ff1905bceef8eac49 (diff)
Fix functional tests
Diffstat (limited to 'tests')
-rw-r--r--tests/functionals.mysql.xml2
-rw-r--r--tests/functionals.postgres.xml2
-rw-r--r--tests/functionals.sqlite.xml2
-rw-r--r--tests/functionals/ApiTest.php15
4 files changed, 10 insertions, 11 deletions
diff --git a/tests/functionals.mysql.xml b/tests/functionals.mysql.xml
index 61cb05df..a8877f92 100644
--- a/tests/functionals.mysql.xml
+++ b/tests/functionals.mysql.xml
@@ -1,4 +1,4 @@
-<phpunit>
+<phpunit stopOnError="true" stopOnFailure="true" colors="true">
<testsuites>
<testsuite name="Kanboard">
<directory>functionals</directory>
diff --git a/tests/functionals.postgres.xml b/tests/functionals.postgres.xml
index eb83d157..61da8574 100644
--- a/tests/functionals.postgres.xml
+++ b/tests/functionals.postgres.xml
@@ -1,4 +1,4 @@
-<phpunit>
+<phpunit stopOnError="true" stopOnFailure="true" colors="true">
<testsuites>
<testsuite name="Kanboard">
<directory>functionals</directory>
diff --git a/tests/functionals.sqlite.xml b/tests/functionals.sqlite.xml
index 0d011ac3..9da59b20 100644
--- a/tests/functionals.sqlite.xml
+++ b/tests/functionals.sqlite.xml
@@ -1,4 +1,4 @@
-<phpunit>
+<phpunit stopOnError="true" stopOnFailure="true" colors="true">
<testsuites>
<testsuite name="Kanboard">
<directory>functionals</directory>
diff --git a/tests/functionals/ApiTest.php b/tests/functionals/ApiTest.php
index 642288b8..b7ae80f1 100644
--- a/tests/functionals/ApiTest.php
+++ b/tests/functionals/ApiTest.php
@@ -43,7 +43,6 @@ class Api extends PHPUnit_Framework_TestCase
{
$tasks = $this->client->getAllTasks(1, 1);
$this->assertNotEmpty($tasks);
- $this->assertEquals(1, count($tasks));
return $tasks[0]['id'];
}
@@ -967,12 +966,12 @@ class Api extends PHPUnit_Framework_TestCase
public function testCreateFile()
{
- $this->assertEquals(1, $this->client->createFile(1, 1, 'My file', base64_encode('plain text file')));
+ $this->assertNotFalse($this->client->createFile(1, $this->getTaskId(), 'My file', base64_encode('plain text file')));
}
public function testGetAllFiles()
{
- $files = $this->client->getAllFiles(array('task_id' => 1));
+ $files = $this->client->getAllFiles(array('task_id' => $this->getTaskId()));
$this->assertNotEmpty($files);
$this->assertCount(1, $files);
@@ -995,16 +994,16 @@ class Api extends PHPUnit_Framework_TestCase
public function testRemoveAllFiles()
{
- $this->assertEquals(1, $this->client->createFile(1, 1, 'My file 1', base64_encode('plain text file')));
- $this->assertEquals(2, $this->client->createFile(1, 1, 'My file 2', base64_encode('plain text file')));
+ $this->assertNotFalse($this->client->createFile(1, $this->getTaskId(), 'My file 1', base64_encode('plain text file')));
+ $this->assertNotFalse($this->client->createFile(1, $this->getTaskId(), 'My file 2', base64_encode('plain text file')));
- $files = $this->client->getAllFiles(array('task_id' => 1));
+ $files = $this->client->getAllFiles(array('task_id' => $this->getTaskId()));
$this->assertNotEmpty($files);
$this->assertCount(2, $files);
- $this->assertTrue($this->client->removeAllFiles(array('task_id' => 1)));
+ $this->assertTrue($this->client->removeAllFiles(array('task_id' => $this->getTaskId())));
- $files = $this->client->getAllFiles(array('task_id' => 1));
+ $files = $this->client->getAllFiles(array('task_id' => $this->getTaskId()));
$this->assertEmpty($files);
}