getAppUrls()); $sortie = $niveau->afficherNiveau(); $this->assertNotEmpty($sortie, print_r($sortie, true)); $this->assertNotContains(' ', $sortie); $this->assertContains('', $sortie, print_r($sortie,true)); $this->assertContains('', $sortie); $this->assertContains('', $sortie); $this->assertContains('', $sortie); } protected function getAppUrls() { $AppUrls = $this->getMock('AppUrls', array('obtenirUrlBase'), array(), '', false); $AppUrls->expects($this->any()) ->method('obtenirUrlBase') ->will($this->returnCallback(array($this, 'genererUrlBase'))); return $AppUrls; } public function genererUrlBase($id) { return sprintf(self::TPL_URL_BASE, $id); } } ?>