Commit ff39cde1 authored by Karamel's avatar Karamel
Browse files

Add 400 responses in product routes. Fix AssociationNotFound class.

AssociationNotFound can hold the class of the embedded record instead of
always the one from the main record.
parent f8a46351
<?php
use \Pasteque\Server\Exception\InvalidFieldException;
use \Pasteque\Server\Model\Product;
use \Pasteque\Server\System\API\APICaller;
use \Pasteque\Server\System\API\APIResult;
......@@ -115,7 +116,18 @@ $app->PUT('/api/product',
$ptApp = $this->get('settings')['ptApp'];
$tab = $request->getParsedBody();
$prd = new Product();
$prd->merge($tab, $ptApp->getDao());
$otherPrd = Product::load($tab['reference'], $ptApp->getDao());
if ($otherPrd !== null) {
$e = new InvalidFieldException(InvalidFieldException::CSTR_UNIQUE,
Product::class, 'reference',
['reference' => $tab['reference']], $tab['reference']);
return $response->reject($e, 'Reference is already taken');
}
try {
$prd->merge($tab, $ptApp->getDao());
} catch (InvalidFieldException $e) {
return $response->reject($e);
}
return $response->withApiResult(APICaller::run($ptApp, 'product', 'write',
$prd));
});
......@@ -125,14 +137,29 @@ $app->POST('/api/product',
function($request, $response, $args) {
$ptApp = $this->get('settings')['ptApp'];
$tab = $request->getParsedBody();
$prd = null;
if (!empty($tab['id'])) {
$prd = Product::loadFromId($tab['id'], $ptApp->getDao());
}
if ($prd === null) {
$prd = Product::loadFromId($tab['id'], $ptApp->getDao());
if ($prd == null) {
$prd = new Product();
}
$prd->merge($tab,$ptApp->getDao());
$otherPrd = Product::load($tab['reference'], $ptApp->getDao());
if ($otherPrd !== null) {
if ($prd->getId() != $otherPrd->getId()) {
$loadKey = null;
if (!empty($tab['id'])) {
$loadKey = ['id' => $tab['id']];
} else {
$loadKey = Product::getLoadKey($tab);
}
$e = new InvalidFieldException(InvalidFieldException::CSTR_UNIQUE,
Product::class, 'reference', $loadKey, $tab['reference']);
return $response->reject($e, 'Reference is already taken');
}
}
try {
$prd->merge($tab,$ptApp->getDao());
} catch (InvalidFieldException $e) {
return $response->reject($e);
}
return $response->withApiResult(APICaller::run($ptApp, 'product', 'write',
$prd));
});
......@@ -151,10 +178,17 @@ $app->PUT('/api/product/{reference}',
$tab['reference'] = $args['reference'];
$prd = Product::load($tab['reference'], $ptApp->getDao());
if ($prd !== null) {
return $response->withStatus(400, 'Reference is already taken');
$e = new InvalidFieldException(InvalidFieldException::CSTR_UNIQUE,
Product::class, 'reference',
['reference' => $tab['reference']], $tab['reference']);
return $response->reject($e, 'Reference is already taken');
}
$prd = new Product();
$prd->merge($tab,$ptApp->getDao());
try {
$prd->merge($tab,$ptApp->getDao());
} catch (InvalidFieldException $e) {
return $response->reject($e);
}
return $response->withApiResult(APICaller::run($ptApp, 'product', 'write',
$prd));
});
......@@ -170,11 +204,25 @@ $app->PATCH('/api/product/{reference}',
if (!empty($tab['id'])) {
return $response->withStatus(400, 'Do not send Id, use reference instead.');
}
$prd = Product::load($args['reference']);
$prd = Product::load($args['reference'], $ptApp->getDao());
if ($prd === null) {
return $response->withStatus(404, 'No product found.');
$e = new RecordNotFoundException(Product::class, $args['reference']);
return $response->notFound($e, 'No product found.');
}
if ($tab['reference'] != $args['reference']) {
$otherPrd = Product::load($tab['reference'], $ptApp->getDao());
if ($otherPrd !== null) {
$e = new InvalidFieldException(InvalidFieldException::CSTR_UNIQUE,
Product::class, 'reference',
['reference' => $args['reference']], $tab['reference']);
return $response->reject($e, 'Reference is already taken');
}
}
try {
$prd->merge($tab,$ptApp->getDao());
} catch (InvalidFieldException $e) {
return $response->reject($e);
}
$prd->merge($tab,$ptApp->getDao());
return $response->withApiResult(APICaller::run($ptApp, 'product', 'write',
$prd));
});
......@@ -33,7 +33,7 @@ use \Pasteque\Server\System\DAO\DoctrineEmbeddedModel;
class CompositionGroup extends DoctrineEmbeddedModel
{
protected static function getDirectFieldNames() {
return ['id', 'label', 'dispOrder'];
return ['label', 'dispOrder'];
}
protected static function getAssociationFields() {
return [
......
......@@ -330,7 +330,7 @@ abstract class DoctrineModel
if ($submodel === null) {
throw new InvalidFieldException(
InvalidFieldException::CSTR_ASSOCIATION_NOT_FOUND,
$field['class'], $field['name'],
static::class, $field['name'],
null, $content);
}
}
......@@ -349,7 +349,7 @@ abstract class DoctrineModel
if ($subrecord === null) {
throw new InvalidFieldException(
InvalidFieldException::CSTR_ASSOCIATION_NOT_FOUND,
$field['class'], $field['name'],
static::class, $field['name'],
null, $struct[$field['name']]);
}
}
......
......@@ -34,7 +34,7 @@ require_once(dirname(dirname(__FILE__)) . "/common_load.php");
/** Test for DoctrineDAO and also DoctrineModel, because they work together. */
class DoctrineDAOTest extends TestCase
{
const MODEL_NAME = '\Pasteque\Server\Model\Category';
const MODEL_NAME = 'Pasteque\Server\Model\Category';
private $dao;
/** A category to test CRUD. */
private $cat;
......
......@@ -22,6 +22,7 @@
namespace Pasteque\Server;
use \Pasteque\Server\Model\PaymentMode;
use \Pasteque\Server\Model\PaymentModeReturn;
use \Pasteque\Server\System\Login;
use \Pasteque\Server\System\DAO\DAOCondition;
use \Pasteque\Server\System\DAO\DAOFactory;
......@@ -151,7 +152,7 @@ class HttpPaymentModeTest extends TestCase
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('AssociationNotFound', $jsResp['constraint']);
$this->assertEquals(PaymentMode::class, $jsResp['class']);
$this->assertEquals(PaymentModeReturn::class, $jsResp['class']);
$this->assertEquals('returnMode', $jsResp['field']);
$this->assertEquals($this->pm->getId() + 1, $jsResp['value']);
$this->assertEquals('New ref', $jsResp['key']['reference']);
......@@ -266,7 +267,7 @@ class HttpPaymentModeTest extends TestCase
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('AssociationNotFound', $jsResp['constraint']);
$this->assertEquals(PaymentMode::class, $jsResp['class']);
$this->assertEquals(PaymentModeReturn::class, $jsResp['class']);
$this->assertEquals('returnMode', $jsResp['field']);
$this->assertEquals($this->pm->getId() + 1, $jsResp['value']);
$this->assertEquals('New ref', $jsResp['key']['reference']);
......@@ -414,7 +415,7 @@ class HttpPaymentModeTest extends TestCase
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('AssociationNotFound', $jsResp['constraint']);
$this->assertEquals(PaymentMode::class, $jsResp['class']);
$this->assertEquals(PaymentModeReturn::class, $jsResp['class']);
$this->assertEquals('returnMode', $jsResp['field']);
$this->assertEquals($this->pm->getId() + 1, $jsResp['value']);
$this->assertEquals('Reference', $jsResp['key']['reference']);
......
......@@ -78,6 +78,105 @@ class HttpProductTest extends TestCase
$this->dao->close();
}
private function defaultPrd() {
$prd = new Product();
$prd->setReference('ref');
$prd->setLabel('label');
$prd->setPriceSell(10.0);
$prd->setCategory($this->cat);
$prd->setTax($this->tax);
return $prd;
}
private function defaultPrdStruct() {
$prd = $this->defaultPrd();
return $prd->toStruct();
}
public function testPostNew() {
$struct = $this->defaultPrdStruct();
curl_setopt($this->curl, CURLOPT_URL, apiUrl('api/product'));
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(200, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$dbPrd = $this->dao->search(Product::class,
new DAOCondition('reference', '=', $struct['reference']));
$this->assertEquals(1, count($dbPrd));
}
public function testPostUpdate() {
$prd = $this->defaultPrd();
$this->dao->write($prd);
$this->dao->commit();
$struct = $prd->toStruct();
$struct['reference'] = 'edited ref';
$struct['label'] = 'edited';
curl_setopt($this->curl, CURLOPT_URL, apiUrl('api/product'));
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(200, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$dbPrd = $this->dao->readSnapshot(Product::class, $prd->getId());
$this->assertNotNull($dbPrd);
$this->assertEquals('edited ref', $dbPrd->getReference());
$this->assertEquals('edited', $dbPrd->getLabel());
}
public function testPostRefExisting() {
$prd = $this->defaultPrd();
$this->dao->write($prd);
$this->dao->commit();
$struct = $prd->toStruct();
unset($struct['id']);
$struct['label'] = 'edited';
curl_setopt($this->curl, CURLOPT_URL, apiUrl('api/product'));
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$jsResp = json_decode($resp, true);
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('UniqueValue', $jsResp['constraint']);
$this->assertEquals(Product::class, $jsResp['class']);
$this->assertEquals('reference', $jsResp['field']);
$this->assertEquals($prd->getReference(), $jsResp['value']);
$this->assertEquals($prd->getReference(), $jsResp['key']['reference']);
}
public function testPostInvalidTax() {
$struct = $this->defaultPrdStruct();
$struct['tax'] = $this->tax->getId() + 1;
curl_setopt($this->curl, CURLOPT_URL, apiUrl('api/product'));
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$jsResp = json_decode($resp, true);
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('AssociationNotFound', $jsResp['constraint']);
$this->assertEquals(Product::class, $jsResp['class']);
$this->assertEquals('tax', $jsResp['field']);
$this->assertEquals($this->tax->getId() + 1, $jsResp['value']);
$this->assertEquals($struct['reference'], $jsResp['key']['reference']);
}
public function testPutOk() {
$prd = new Product();
$prd->setCategory($this->cat);
......@@ -87,7 +186,8 @@ class HttpProductTest extends TestCase
$prd->setPriceSell(10);
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s', urlencode($prd->getReference()))));
apiUrl(sprintf('api/product/%s',
urlencode($prd->getReference()))));
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS,
json_encode($prd->toStruct()));
......@@ -154,7 +254,8 @@ class HttpProductTest extends TestCase
$json['id'] = 1;
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s', urlencode($prd->getReference()))));
apiUrl(sprintf('api/product/%s',
urlencode($prd->getReference()))));
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($json));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
......@@ -204,7 +305,8 @@ class HttpProductTest extends TestCase
$prd2->setPriceSell(10);
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s', urlencode($prd2->getReference()))));
apiUrl(sprintf('api/product/%s',
urlencode($prd2->getReference()))));
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS,
json_encode($prd2->toStruct()));
......@@ -213,7 +315,227 @@ class HttpProductTest extends TestCase
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$jsResp = json_decode($resp, true);
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('UniqueValue', $jsResp['constraint']);
$this->assertEquals(Product::class, $jsResp['class']);
$this->assertEquals('reference', $jsResp['field']);
$this->assertEquals($prd2->getReference(), $jsResp['value']);
$this->assertEquals($prd2->getReference(), $jsResp['key']['reference']);
}
public function testPutInvalidTax() {
$struct = $this->defaultPrdStruct();
$struct['tax'] = $this->tax->getId() + 1;
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s',
urlencode($struct['reference']))));
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$jsResp = json_decode($resp, true);
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('AssociationNotFound', $jsResp['constraint']);
$this->assertEquals(Product::class, $jsResp['class']);
$this->assertEquals('tax', $jsResp['field']);
$this->assertEquals($this->tax->getId() + 1, $jsResp['value']);
$this->assertEquals($struct['reference'], $jsResp['key']['reference']);
}
public function testPatchOk() {
$prd = $this->defaultPrd();;
$this->dao->write($prd);
$this->dao->commit();
$struct = $prd->toStruct();
unset($struct['id']);
$struct['label'] = 'edited';
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s',
urlencode($prd->getReference()))));
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(200, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$dbPrd = $this->dao->readSnapshot(Product::class, $prd->getId());
$this->assertEquals('edited', $dbPrd->getLabel());
}
/** @depends testPatchOk */
public function testPatchCompo() {
$prd = new Product();
$prd->setCategory($this->cat);
$prd->setTax($this->tax);
$prd->setReference('ref');
$prd->setLabel('label');
$prd->setPriceSell(10);
$this->dao->write($prd);
$this->dao->commit();
$compo = new Product();
$compo->setCategory($this->cat);
$compo->setTax($this->tax);
$compo->setReference('compo');
$compo->setLabel('Compo');
$compo->setPriceSell(15);
$compo->setComposition(true);
$grp = new CompositionGroup();
$grp->setLabel('Group');
$grpPrd = new CompositionProduct();
$grpPrd->setProduct($prd);
$grp->addCompositionProduct($grpPrd);
$compo->addCompositionGroup($grp);
$this->dao->write($prd);
$this->dao->commit();
$struct = $compo->toStruct();
unset($struct['id']);
unset($struct['compositionGroups'][0]['id']);
unset($struct['compositionGroups'][0]['compositionProducts'][0]['id']);
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s',
urlencode($compo->getReference()))));
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(200, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$dbPrd = $this->dao->search(Product::class,
new DAOCondition('reference', '=', $compo->getReference()));
$this->assertEquals(1, count($dbPrd));
}
public function testPatchId() {
$prd = new Product();
$prd->setCategory($this->cat);
$prd->setTax($this->tax);
$prd->setReference('ref');
$prd->setLabel('label');
$prd->setPriceSell(10);
$this->dao->write($prd);
$this->dao->commit();
$struct = $prd->toStruct();
$struct['id'] = 1;
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s',
urlencode($prd->getReference()))));
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$this->markTestIncomplete('Test response message, not available easily with curl');
}
public function testPatchRefMismatch() {
$prd = new Product();
$prd->setCategory($this->cat);
$prd->setTax($this->tax);
$prd->setReference('ref');
$prd->setLabel('label');
$prd->setPriceSell(10);
$this->dao->write($prd);
$this->dao->commit();
$struct = $prd->toStruct();
unset($struct['id']);
$struct['reference'] = 'New ref';
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s',
$prd->getReference())));
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS,
json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(200, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$dbPrd = $this->dao->search(Product::class);
$this->assertEquals(1, count($dbPrd));
$dbPrd = $this->dao->readSnapshot(Product::class, $prd->getId());
$this->assertEquals('New ref', $dbPrd->getReference());
}
public function testPatchRefExisting() {
$prd = new Product();
$prd->setCategory($this->cat);
$prd->setTax($this->tax);
$prd->setReference('ref');
$prd->setLabel('label');
$prd->setPriceSell(10);
$this->dao->write($prd);
$prd2 = new Product();
$prd2->setCategory($this->cat);
$prd2->setTax($this->tax);
$prd2->setReference('ref2');
$prd2->setLabel('other label');
$prd2->setPriceSell(10);
$this->dao->write($prd2);
$this->dao->commit();
$struct = $prd->toStruct();
unset($struct['id']);
$struct['reference'] = $prd2->getReference();
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s',
urlencode($prd->getReference()))));
curl_setopt($this->curl, CURLOPT_POST, true);
curl_setopt($this->curl, CURLOPT_POSTFIELDS,
json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$jsResp = json_decode($resp, true);
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('UniqueValue', $jsResp['constraint']);
$this->assertEquals(Product::class, $jsResp['class']);
$this->assertEquals('reference', $jsResp['field']);
$this->assertEquals($prd2->getReference(), $jsResp['value']);
$this->assertEquals($prd->getReference(), $jsResp['key']['reference']);
}
public function testPatchInvalidTax() {
$prd = $this->defaultPrd();
$this->dao->write($prd);
$this->dao->commit();
$struct = $prd->toStruct();
unset($struct['id']);
$struct['tax'] = $this->tax->getId() + 1;
curl_setopt($this->curl, CURLOPT_URL,
apiUrl(sprintf('api/product/%s',
urlencode($struct['reference']))));
curl_setopt($this->curl, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($this->curl, CURLOPT_POSTFIELDS, json_encode($struct));
curl_setopt($this->curl, CURLOPT_HTTPHEADER,
[Login::TOKEN_HEADER . ': ' . static::$token,
'Content-Type: application/json']);
$resp = curl_exec($this->curl);
$this->assertEquals(400, curl_getinfo($this->curl, CURLINFO_HTTP_CODE));
$jsResp = json_decode($resp, true);
$this->assertNotEquals(false, $jsResp);
$this->assertEquals('InvalidField', $jsResp['error']);
$this->assertEquals('AssociationNotFound', $jsResp['constraint']);
$this->assertEquals(Product::class, $jsResp['class']);
$this->assertEquals('tax', $jsResp['field']);
$this->assertEquals($this->tax->getId() + 1, $jsResp['value']);
$this->assertEquals($struct['reference'], $jsResp['key']['reference']);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment