find('Phraseanet:Task', 1); $converter = new TaskConverter(self::$DI['app']['orm.em']->getRepository('Phraseanet:Task')); $this->assertSame($task, $converter->convert(1)); } /** * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @expectedExceptionMessage Task prout not found. */ public function testConvertFailure() { $converter = new TaskConverter(self::$DI['app']['orm.em']->getRepository('Phraseanet:Task')); $converter->convert('prout'); } }