Merge pull request #5536 from derMart/fix/categorycest

fix CategoryCest unit test relying on app_locale=en
This commit is contained in:
Devansh 2022-01-05 09:39:53 +05:30 committed by GitHub
commit 94ea9f8aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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,