public function testAddAll() { $this->seq->addAll(array(2, 1, 3)); $this->assertSame(array(0, $this->a, $this->b, 0, 2, 1, 3), $this->seq->all()); $this->seq->sortWith(function ($a, $b) { if (is_integer($a)) { if (!is_integer($b)) { return -1; } return $a > $b ? 1 : -1; } if (is_integer($b)) { return 1; } return -1; }); $this->assertSame(array(0, 0, 1, 2, 3, $this->a, $this->b), $this->seq->all()); }
/** * @param Checker $checker */ public function addChecker(Checker $checker) { $this->checkers->add($checker); $this->checkers->sortWith($this->checkersSorter()); }