Am installing xmlps software. Installation is done. When I try test, using this ./unittest.sh command.
Am getting a mentioned below error.
*****************************************************************************
root@gains [/home/quotequadsco/pkp/xmlps]# ./unittest.sh
PHPUnit 3.7.29 by Sebastian Bergmann.
Configuration read from /home/quotequadsco/pkp/xmlps/phpunit.xml
.................F
Time: 3.86 seconds, Memory: 42.25Mb
There was 1 failure:
1) ApiTest\Controller\ApiControllerTest::testSubmitAction
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-error
+success
/home/quotequadsco/pkp/xmlps/module/Api/test/ApiTest/Controller/JobControllerTest.php:63
FAILURES!
Tests: 18, Assertions: 56, Failures: 1.
*****************************************************************************
JobControllerTest.php
<?php
namespace ApiTest\Controller;
use Api\Entity\Job;
use Xmlps\UnitTest\ControllerTest;
class ApiControllerTest extends ControllerTest
{
protected $document;
protected $job;
protected $user;
protected $testFile = '/tmp/UNITTEST_document.txt';
protected $citationStyles;
public function setUp()
{
parent::setUp();
$this->citationStyles = $this->sm->get('CitationstyleConversion\Model\Citationstyles');
$this->resetTestData();
}
public function testSubmitActionCannotBeAccessedLoggedOut()
{
$this->dispatch($this->buildQuery('submit', array(), false));
$this->assertResponseStatusCode(403);
}
public function testSubmitAction()
{
$styleMap = $this->citationStyles->getStyleMap();
$keys = array_keys($styleMap);
$data = array(
'fileName' => 'Testfile.txt',
'fileContent' => base64_encode('Test Content'),
'citationStyleHash' => $keys[0],
);
$this->dispatch($this->buildQuery('submit', $data));
$this->assertResponseStatusCode(200);
$response = json_decode($this->getResponse()->getContent());
$this->assertTrue(is_object($response));
$this->assertSame($response->status, 'success');
$this->assertNotEmpty($response->id);
}
How to fix this error. I searched a lot but dint get anything.