/** * It should mark iterations as rejected if they deviate too far from the mean. */ public function testReject() { $iterations = new IterationCollection($this->subject->reveal(), $this->parameterSet->reveal(), 50); $iterations->replace(array($iter1 = $this->createIteration(4, -50), $iter2 = $this->createIteration(8, 0), $iter3 = $this->createIteration(4, -50), $iter4 = $this->createIteration(16, 100))); $iterations->computeStats(); $this->assertCount(3, $iterations->getRejects()); $this->assertContains($iter1, $iterations->getRejects()); $this->assertContains($iter3, $iterations->getRejects()); $this->assertContains($iter4, $iterations->getRejects()); $this->assertNotContains($iter2, $iterations->getRejects()); }