Skip to content

Commit

Permalink
TE-5921 Adjusted tests to be compatible with PHPUnit9
Browse files Browse the repository at this point in the history
  • Loading branch information
asaulenko committed Feb 5, 2021
1 parent ec835db commit 177d483
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ public function testGetProductListIdsByProductIdsReturnsCorrectData(): void

//Arrange
$this->assertCount(2, $result);
$resultProductConcreteIds = array_column($result, SpyProductListProductConcreteTableMap::COL_FK_PRODUCT);
$resultProductConcreteIds = array_map(
'intval',
array_column($result, SpyProductListProductConcreteTableMap::COL_FK_PRODUCT)
);
$this->assertContains($productConcreteIds[0], $resultProductConcreteIds);
$this->assertContains($productConcreteIds[1], $resultProductConcreteIds);
}
Expand Down Expand Up @@ -184,7 +187,10 @@ public function testGetProductListByProductAbstractIdsThroughCategoryReturnsCorr

//Arrange
$this->assertCount(2, $result);
$resultProductAbstractIds = array_column($result, ProductListRepository::COL_ID_PRODUCT_ABSTRACT);
$resultProductAbstractIds = array_map(
'intval',
array_column($result, ProductListRepository::COL_ID_PRODUCT_ABSTRACT)
);
$this->assertContains($productAbstractIds[0], $resultProductAbstractIds);
$this->assertContains($productAbstractIds[1], $resultProductAbstractIds);
}
Expand All @@ -210,7 +216,10 @@ public function testGetProductBlacklistsByProductAbstractIdsReturnsCorrectData()

//Arrange
$this->assertCount(2, $result);
$resultProductAbstractIds = array_column($result, ProductListRepository::COL_ID_PRODUCT_ABSTRACT);
$resultProductAbstractIds = array_map(
'intval',
array_column($result, ProductListRepository::COL_ID_PRODUCT_ABSTRACT)
);
$this->assertContains($productAbstractIds[0], $resultProductAbstractIds);
$this->assertContains($productAbstractIds[1], $resultProductAbstractIds);
}
Expand All @@ -236,7 +245,10 @@ public function testGetProductWhitelistsByProductAbstractIdsReturnsCorrectData()

//Arrange
$this->assertCount(2, $result);
$resultProductAbstractIds = array_column($result, ProductListRepository::COL_ID_PRODUCT_ABSTRACT);
$resultProductAbstractIds = array_map(
'intval',
array_column($result, ProductListRepository::COL_ID_PRODUCT_ABSTRACT)
);
$this->assertContains($productAbstractIds[0], $resultProductAbstractIds);
$this->assertContains($productAbstractIds[1], $resultProductAbstractIds);
}
Expand Down

0 comments on commit 177d483

Please sign in to comment.