Skip to content

Commit f3583ab

Browse files
committed
Groupby test now tests recombine as well.
1 parent 8e001bc commit f3583ab

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/DataFrameTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,12 +661,13 @@ public function testCumulativeMin()
661661

662662
public function testGroupby()
663663
{
664-
$df = dataframe([
664+
$original = [
665665
['name' => 'Falcon', 'Animal' => 'bird', 'Age' => 8, 'size' => 'big'],
666666
['name' => 'Pigeon', 'Animal' => 'bird', 'Age' => 4, 'size' => 'small'],
667667
['name' => 'Goat', 'Animal' => 'mammal', 'Age' => 12, 'size' => 'small'],
668668
['name' => 'Possum', 'Animal' => 'mammal', 'Age' => 2, 'size' => 'big']
669-
]);
669+
];
670+
$df = dataframe($original);
670671
$g = $df->groupby('Animal');
671672

672673
$exp = [
@@ -681,6 +682,8 @@ public function testGroupby()
681682
];
682683

683684
$this->assertSame($exp, array_values($g->data()));
685+
686+
$this->assertSame($original, $g->combine()->data());
684687
}
685688

686689
public function testTranspose()

0 commit comments

Comments
 (0)