_evaluator = new OsikaEvaluator(); } public function handProvider() { $file = file('OsikaEvaluatorTest.tests'); $ret = []; $switch = false; $item; foreach ($file as $line) { if (trim($line)) { if ($switch) { $item[] = json_decode($line); $ret[] = $item; } else { $item = [trim($line)]; } $switch = !$switch; } } return $ret; } /** * @dataProvider handProvider **/ public function testEvaluation($hand, $result) { $this->_evaluator->setHand($hand); $this->assertEquals($result, $this->_evaluator->evaluate()); } } ?>