From 7d53f3a525371e28a932130457eaac72045986c7 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 7 Aug 2015 14:36:16 +0200 Subject: add integration test for generating search indices via command line --- tests/integration/bootstrap.php | 10 ++++++++++ tests/integration/command/CommandTest.php | 21 +++++++++++++++++++++ tests/integration/db/FeedMapperTest.php | 13 +++++++++++-- tests/integration/db/FolderMapperTest.php | 13 +++++++++++-- tests/integration/db/ItemMapperTest.php | 13 +++++++++++-- 5 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 tests/integration/command/CommandTest.php diff --git a/tests/integration/bootstrap.php b/tests/integration/bootstrap.php index badb0f788..62e148143 100644 --- a/tests/integration/bootstrap.php +++ b/tests/integration/bootstrap.php @@ -1,4 +1,14 @@ + * @copyright Bernhard Posselt 2015 + */ + namespace OCA\News\Tests\Integration; require_once __DIR__ . '/../../../../lib/base.php'; diff --git a/tests/integration/command/CommandTest.php b/tests/integration/command/CommandTest.php new file mode 100644 index 000000000..ed63e5251 --- /dev/null +++ b/tests/integration/command/CommandTest.php @@ -0,0 +1,21 @@ + + * @copyright Bernhard Posselt 2015 + */ + +class CommandTest extends \PHPUnit_Framework_TestCase { + + public function testCommandOk() { + $command = __DIR__ . '/../../../../../occ news:create-search-indices'; + exec($command, $_, $success); + + $this->assertSame(0, $success); + } + +} diff --git a/tests/integration/db/FeedMapperTest.php b/tests/integration/db/FeedMapperTest.php index c8de68281..7979a04ea 100644 --- a/tests/integration/db/FeedMapperTest.php +++ b/tests/integration/db/FeedMapperTest.php @@ -1,5 +1,14 @@ + * @copyright Bernhard Posselt 2015 + */ + namespace OCA\News\Db; use \OCA\News\Tests\Integration\NewsIntegrationTest; @@ -43,4 +52,4 @@ class FeedMapperTest extends NewsIntegrationTest { }*/ -} \ No newline at end of file +} diff --git a/tests/integration/db/FolderMapperTest.php b/tests/integration/db/FolderMapperTest.php index 1af862340..a6aaae59c 100644 --- a/tests/integration/db/FolderMapperTest.php +++ b/tests/integration/db/FolderMapperTest.php @@ -1,5 +1,14 @@ + * @copyright Bernhard Posselt 2015 + */ + namespace OCA\News\Db; use \OCA\News\Tests\Integration\NewsIntegrationTest; @@ -39,4 +48,4 @@ class FolderMapperTest extends NewsIntegrationTest { -} \ No newline at end of file +} diff --git a/tests/integration/db/ItemMapperTest.php b/tests/integration/db/ItemMapperTest.php index 7989eb2e7..0c24660b3 100644 --- a/tests/integration/db/ItemMapperTest.php +++ b/tests/integration/db/ItemMapperTest.php @@ -1,5 +1,14 @@ + * @copyright Bernhard Posselt 2015 + */ + namespace OCA\News\Db; use \OCA\News\Tests\Integration\NewsIntegrationTest; @@ -231,4 +240,4 @@ class ItemMapperTest extends NewsIntegrationTest { } */ -} \ No newline at end of file +} -- cgit v1.2.3