$fiveCount = 1;
$aggregation =
array_merge( self::
getDatabaseMatrixAggregationArray($oneCount,
$twoCount,
$threeCount,
$fourCount,
$fiveCount),
self::
getDatabaseMatrixAggregationArrayWithFloats($oneCount,
$twoCount,
$threeCount,
$fourCount,
$fiveCount) );
$matrix =
new RatingMatrix($aggregation);
$expectedRatingScore = 3.2;
$expectedReviewCounts = 2 *
($oneCount +
$twoCount +
$threeCount +
$fourCount +
$fiveCount);
$expectedTotal = 32;
static::
assertCount(5,
$matrix->
getMatrix());
static::
assertEquals($expectedRatingScore,
$matrix->
getAverageRating());
static::
assertEquals($expectedReviewCounts,
$matrix->
getTotalReviewCount());
static::
assertEquals($expectedTotal,
$matrix->
getPointSum());
} /**
* function tests that every MatrixElement struct is generated correctly by matrix constructor
*
* @group reviews
*/
public function testMatrixElements(): void
{