Exemplo n.º 1
0
 /** @test */
 function it_should_know_if_cfp_is_closing_soon()
 {
     //within two weeks is ending soon
     //datetime now - one week
     $cfp = new CallForPapers("Conference Conference", new DateTime('+1 week'));
     $this->assertTrue($cfp->isClosingSoon());
     //        datetimenow - two weeks
     //        datetimenow - (two weeks + 1 day)
 }
Exemplo n.º 2
0
 /**
  * @param CallForPapers $other
  *
  * @return bool
  */
 private function nameLike(CallForPapers $other)
 {
     $lowerName = strtolower($this->getName());
     $lowerOtherName = strtolower($other->getName());
     return $lowerName == $lowerOtherName;
 }