public function test_friendly_date_given_date_plus_5years_returns_in5years_string()
 {
     $expected = 'in 5 years';
     $date = strtotime('+5 years', self::TODAY_TIMESTAMP);
     $actual = $this->instance->friendly_date($date);
     $this->assertEquals($expected, $actual);
 }
Exemplo n.º 2
0
 /**
  * Return a friendly date compared to the current date
  *
  * @param $timestamp	string|int 	The timestamp we want return a friendly date for
  *
  * @return string		A friendly date
  */
 function foo_friendly_date($timestamp)
 {
     $instance = new Foo_Friendly_Dates_v1();
     return $instance->friendly_date($timestamp);
 }