/**
  * Returns the answer to life, universe and everything - in case you spend enough money, that is.
  *
  * @param int $money Optional. Money spent for an answer. Defaults to 0.
  *
  * @return string
  */
 public function get_answer($money = 0)
 {
     if ((int) $money < 5) {
         return '';
     }
     return $this->oracle->get_answer();
 }
Beispiel #2
0
 /**
  * Test for the get_answer() method.
  *
  * @covers Oracle::get_answer()
  *
  * @return void
  */
 public function test_get_answer()
 {
     $testee = new Oracle();
     $this->assertSame('42', $testee->get_answer(), 'get_answer() should return the expected answer.');
 }