Esempio n. 1
0
 /**
  * @dataProvider dateTimes
  */
 public function testAggregateValues(\Pinq\ITraversable $traversable, array $data)
 {
     $this->assertEquals(true, $traversable->all(), 'All');
     $this->assertEquals(true, $traversable->any(), 'Any');
     $this->assertEquals(max($data), $traversable->maximum(), 'Max');
     $this->assertEquals(min($data), $traversable->minimum(), 'Min');
 }
Esempio n. 2
0
 public function visitMaximum(Requests\Maximum $request)
 {
     return $this->traversable->maximum($this->getOptionalFunction($request));
 }
Esempio n. 3
0
 /**
  * @dataProvider everything
  */
 public function testThatMaximumOperatesCorrectly(\Pinq\ITraversable $traversable, array $data)
 {
     $this->assertSame(empty($data) ? null : max($data), $traversable->maximum());
 }