Exemplo n.º 1
0
 public function testSayHello()
 {
     $config = new Config();
     $sample = new Sample($config);
     $name = 'Mahmoud Zalt';
     $result = $sample->sayHello($name);
     $expected = $config->get('greeting') . ' ' . $name;
     $this->assertEquals($result, $expected);
 }
Exemplo n.º 2
0
 /**
  * @param $name
  *
  * @return  string
  */
 public function sayHello($name)
 {
     $greeting = $this->config->get('greeting');
     return $greeting . ' ' . $name;
 }