| @@ 26-34 (lines=9) @@ | ||
| 23 | */ |
|
| 24 | private $sun; |
|
| 25 | ||
| 26 | public function testSunRise() |
|
| 27 | { |
|
| 28 | $rise = new \DateTime('2014-01-01 08:00:00'); |
|
| 29 | $set = new \DateTime('2014-01-01 20:00:00'); |
|
| 30 | ||
| 31 | $this->givenThereIsASunObject($rise, $set); |
|
| 32 | ||
| 33 | $this->assertSame($rise, $this->sun->rise); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function testSunSet() |
|
| 37 | { |
|
| @@ 36-44 (lines=9) @@ | ||
| 33 | $this->assertSame($rise, $this->sun->rise); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function testSunSet() |
|
| 37 | { |
|
| 38 | $rise = new \DateTime('2014-01-01 08:00:00'); |
|
| 39 | $set = new \DateTime('2014-01-01 20:00:00'); |
|
| 40 | ||
| 41 | $this->givenThereIsASunObject($rise, $set); |
|
| 42 | ||
| 43 | $this->assertSame($set, $this->sun->set); |
|
| 44 | } |
|
| 45 | ||
| 46 | ||
| 47 | private function givenThereIsASunObject($rise, $set) |
|