Merge pull request #5536 from derMart/fix/categorycest
fix CategoryCest unit test relying on app_locale=en
This commit is contained in:
commit
94ea9f8aeb
|
|
@ -64,7 +64,7 @@ class CategoryCest
|
||||||
$I->seeRecord(CategoryTranslation::class, [
|
$I->seeRecord(CategoryTranslation::class, [
|
||||||
'category_id' => $this->category->id,
|
'category_id' => $this->category->id,
|
||||||
'locale' => $this->localeEn->code,
|
'locale' => $this->localeEn->code,
|
||||||
'url_path' => $this->category->slug,
|
'url_path' => $this->categoryAttributes[$this->localeEn->code]['slug'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->childCategoryAttributes = [
|
$this->childCategoryAttributes = [
|
||||||
|
|
@ -82,7 +82,7 @@ class CategoryCest
|
||||||
$this->category->prependNode($this->childCategory);
|
$this->category->prependNode($this->childCategory);
|
||||||
$I->assertNotNull($this->childCategory);
|
$I->assertNotNull($this->childCategory);
|
||||||
|
|
||||||
$expectedUrlPath = $this->category->slug . '/' . $this->childCategory->slug;
|
$expectedUrlPath = $this->categoryAttributes[$this->localeEn->code]['slug'] . '/' . $this->childCategoryAttributes[$this->localeEn->code]['slug'];
|
||||||
$I->seeRecord(CategoryTranslation::class, [
|
$I->seeRecord(CategoryTranslation::class, [
|
||||||
'category_id' => $this->childCategory->id,
|
'category_id' => $this->childCategory->id,
|
||||||
'locale' => $this->localeEn->code,
|
'locale' => $this->localeEn->code,
|
||||||
|
|
@ -104,7 +104,7 @@ class CategoryCest
|
||||||
$this->childCategory->prependNode($this->grandChildCategory);
|
$this->childCategory->prependNode($this->grandChildCategory);
|
||||||
$I->assertNotNull($this->grandChildCategory);
|
$I->assertNotNull($this->grandChildCategory);
|
||||||
|
|
||||||
$expectedUrlPath .= '/' . $this->grandChildCategory->slug;
|
$expectedUrlPath .= '/' . $this->grandChildCategoryAttributes[$this->localeEn->code]['slug'];
|
||||||
$I->seeRecord(CategoryTranslation::class, [
|
$I->seeRecord(CategoryTranslation::class, [
|
||||||
'category_id' => $this->grandChildCategory->id,
|
'category_id' => $this->grandChildCategory->id,
|
||||||
'locale' => $this->localeEn->code,
|
'locale' => $this->localeEn->code,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue