File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed
tests/PhpSpreadsheetTests/Worksheet Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ public function testVariousSets(): void
9696
9797 $ result = $ columnFilter ->setJoin (Column::AUTOFILTER_COLUMN_JOIN_AND );
9898
99- $ result = $ columnFilter ->getJoin ();
99+ $ result = $ result ->getJoin ();
100100 self ::assertEquals (Column::AUTOFILTER_COLUMN_JOIN_AND , $ result );
101101 }
102102
@@ -174,10 +174,9 @@ public function testSetAttribute(): void
174174 ];
175175
176176 foreach ($ attributeSet as $ attributeName => $ attributeValue ) {
177- // Setters return the instance to implement the fluent interface
178- $ result = $ columnFilter ->setAttribute ($ attributeName , $ attributeValue );
177+ $ columnFilter ->setAttribute ($ attributeName , $ attributeValue );
179178 }
180- self ::assertSame ($ attributeSet , $ result ->getAttributes ());
179+ self ::assertSame ($ attributeSet , $ columnFilter ->getAttributes ());
181180 }
182181
183182 public function testGetAttribute (): void
Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ public function testVariousSets(): void
6767
6868 $ label = 'Total ' ;
6969 $ result = $ column ->setTotalsRowLabel ($ label );
70- self ::assertEquals ($ label , $ column ->getTotalsRowLabel ());
70+ self ::assertEquals ($ label , $ result ->getTotalsRowLabel ());
7171
7272 $ function = 'sum ' ;
7373 $ result = $ column ->setTotalsRowFunction ($ function );
74- self ::assertEquals ($ function , $ column ->getTotalsRowFunction ());
74+ self ::assertEquals ($ function , $ result ->getTotalsRowFunction ());
7575
7676 $ formula = '=SUM(Sales_Data[[#This Row],[Q1]:[Q4]]) ' ;
7777 $ result = $ column ->setColumnFormula ($ formula );
Original file line number Diff line number Diff line change @@ -19,16 +19,16 @@ public function testVariousSets(): void
1919 $ result = $ style ->setTheme (TableStyle::TABLE_STYLE_DARK1 );
2020 self ::assertEquals (TableStyle::TABLE_STYLE_DARK1 , $ result ->getTheme ());
2121
22- $ result = $ style ->setShowFirstColumn (true );
22+ $ style ->setShowFirstColumn (true );
2323 self ::assertTrue ($ style ->getShowFirstColumn ());
2424
25- $ result = $ style ->setShowLastColumn (true );
25+ $ style ->setShowLastColumn (true );
2626 self ::assertTrue ($ style ->getShowLastColumn ());
2727
28- $ result = $ style ->setShowRowStripes (true );
28+ $ style ->setShowRowStripes (true );
2929 self ::assertTrue ($ style ->getShowRowStripes ());
3030
31- $ result = $ style ->setShowColumnStripes (true );
31+ $ style ->setShowColumnStripes (true );
3232 self ::assertTrue ($ style ->getShowColumnStripes ());
3333 }
3434
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ public function testVariousSets(): void
116116 self ::assertFalse ($ result ->getShowHeaderRow ());
117117
118118 $ result = $ table ->setShowTotalsRow (true );
119- self ::assertTrue ($ table ->getShowTotalsRow ());
119+ self ::assertTrue ($ result ->getShowTotalsRow ());
120120 }
121121
122122 public function testGetWorksheet (): void
You can’t perform that action at this time.
0 commit comments