diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-08-07 14:36:16 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-08-07 14:36:16 +0200 |
commit | 7d53f3a525371e28a932130457eaac72045986c7 (patch) | |
tree | 54b1df965a509433dbb5f0d4ad07fefd9d8090e9 | |
parent | fcae747f7a10a5a94b88b13b1281fcba40faa047 (diff) |
add integration test for generating search indices via command line
-rw-r--r-- | tests/integration/bootstrap.php | 10 | ||||
-rw-r--r-- | tests/integration/command/CommandTest.php | 21 | ||||
-rw-r--r-- | tests/integration/db/FeedMapperTest.php | 13 | ||||
-rw-r--r-- | tests/integration/db/FolderMapperTest.php | 13 | ||||
-rw-r--r-- | tests/integration/db/ItemMapperTest.php | 13 |
5 files changed, 64 insertions, 6 deletions
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 @@ <?php +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @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 @@ +<?php +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @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 @@ <?php - +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @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 @@ <?php - +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @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 @@ <?php - +/** + * ownCloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @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 +} |