From 3298667153e3a558d246c1f8f6274a537d8413da Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Sat, 21 Apr 2018 21:28:41 +0100 Subject: [PATCH] Mark SUBTOTAL test as skipped for the moment --- .../Calculation/MathTrigTest.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/PhpSpreadsheetTests/Calculation/MathTrigTest.php b/tests/PhpSpreadsheetTests/Calculation/MathTrigTest.php index 9894a59a..dac660a4 100644 --- a/tests/PhpSpreadsheetTests/Calculation/MathTrigTest.php +++ b/tests/PhpSpreadsheetTests/Calculation/MathTrigTest.php @@ -602,11 +602,10 @@ class MathTrigTest extends TestCase return require 'data/Calculation/MathTrig/SUBTOTALHIDDEN.php'; } - public static $cellValues; - - public function cellValues() { - echo 'CALLED cellValues()', PHP_EOL; - yield from [1,2,3,4,5,6,7,8,9,10]; + protected function cellValues($cellValues) { + return function() use ($cellValues) { + yield from $cellValues; + }; } /** @@ -616,8 +615,9 @@ class MathTrigTest extends TestCase */ public function testNestedSUBTOTAL($expectedResult, ...$args) { - self::$cellValues = Functions::flattenArray(array_slice($args, 1)); - $cellValueGenerator = $this->cellValues(); + $this->markTestSkipped('Revisite when cellValueGenarator() works for mocking getValue() calls'); + + $cellValueGenerator = $this->cellValues(Functions::flattenArray(array_slice($args, 1))); $cell = $this->getMockBuilder(Cell::class) ->setMethods(['getValue', 'isFormula'])