diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-06 10:17:47 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-06 10:17:47 +0100 |
commit | c9f46e2e3caa20d597315cd2fa85b0cce15c4c3b (patch) | |
tree | 14322825c7bb192bfc1b9c63330f30edfb20125b /tests/integration | |
parent | 6ab04993f880e37e0bd53ebdd28045508f2593b2 (diff) |
run integration tests on travis
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/bootstrap.php | 13 | ||||
-rw-r--r-- | tests/integration/db/ItemMapperTest.php | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/integration/bootstrap.php b/tests/integration/bootstrap.php index b9bbe6179..0f010b8f4 100644 --- a/tests/integration/bootstrap.php +++ b/tests/integration/bootstrap.php @@ -9,7 +9,7 @@ class NewsIntegrationTest extends \PHPUnit_Framework_TestCase { protected $userId = 'test'; protected $userPassword = 'test'; - protected function setupNewsDatabase($user='test') { + protected function clearNewsDatabase($user='test') { $sql = [ 'DELETE FROM *PREFIX*news_items WHERE feed_id IN ' . '(SELECT id FROM *PREFIX*news_feeds WHERE user_id = ?)', @@ -29,6 +29,7 @@ class NewsIntegrationTest extends \PHPUnit_Framework_TestCase { if ($userManager->userExists($user)) { $userManager->get($user)->delete(); + $userManager->delete($user); } $userManager->createUser($user, $password); @@ -38,9 +39,13 @@ class NewsIntegrationTest extends \PHPUnit_Framework_TestCase { } - protected function setUpOwnCloud($user='test', $password='test') { - $this->setupUser($user, $password); - $this->setupNewsDatabase($user); + protected function setUp() { + $this->setupUser($this->userId, $this->userPassword); + } + + + protected function tearDown() { + $this->clearNewsDatabase($this->userId); } diff --git a/tests/integration/db/ItemMapperTest.php b/tests/integration/db/ItemMapperTest.php index 23a9fca49..61ea33e47 100644 --- a/tests/integration/db/ItemMapperTest.php +++ b/tests/integration/db/ItemMapperTest.php @@ -11,7 +11,7 @@ class ItemMapperTest extends NewsIntegrationTest { private $itemMapper; protected function setUp() { - parent::setUpOwnCloud(); + parent::setUp(); $app = new Application(); $this->container = $app->getContainer(); $this->itemMapper = $this->container->query('ItemMapper'); |