$this->assertTrue($converter->supports($params));
}
- /**
- * @expectedException InvalidArgumentException
- * @expectedExceptionMessage Route attribute is missing
- */
public function testApplyEmptyRequest()
{
$params = new ParamConverter([]);
$converter = new UsernameRssTokenConverter();
- $converter->apply(new Request(), $params);
+ $res = $converter->apply(new Request(), $params);
+
+ $this->assertFalse($res);
}
/**
- * @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException
+ * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
* @expectedExceptionMessage User not found
*/
public function testApplyUserNotFound()
$converter->apply($request, $params);
- $this->assertEquals($user, $request->attributes->get('user'));
+ $this->assertSame($user, $request->attributes->get('user'));
}
}