From 55660499b49967a4accb4c23c1334e4b94e4bbbd Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 7 Aug 2015 14:41:51 +0200 Subject: also add test for running upgrade via cron --- tests/integration/command/CommandTest.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/integration/command/CommandTest.php b/tests/integration/command/CommandTest.php index ed63e5251..d67e05a2e 100644 --- a/tests/integration/command/CommandTest.php +++ b/tests/integration/command/CommandTest.php @@ -11,8 +11,17 @@ class CommandTest extends \PHPUnit_Framework_TestCase { - public function testCommandOk() { - $command = __DIR__ . '/../../../../../occ news:create-search-indices'; + private $corePath = __DIR__ . '/../../../../../'; + + public function testGenerateIndices() { + $command = $this->corePath . 'occ news:create-search-indices'; + exec($command, $_, $success); + + $this->assertSame(0, $success); + } + + public function testCronUpdate() { + $command = 'php -f ' . $this->corePath . 'cron.php'; exec($command, $_, $success); $this->assertSame(0, $success); -- cgit v1.2.3