php - How do I unit test the view path? -


I have a redirection process if a valid check fails, then redirect the user to a specific page. If a valid check passes, load a view.

In my unit test script, I am using Laurel's own unbreakable redirects, on the unsuccessful process, which works fine:

  $ this - & Gt; AssertRedirectedTo ('those / create'); However, I want to know that if it passes then the view presented is  user / index  - it is not a redirection, So I want to check the path of approach to make sure this is correct.  

There can be no way to see me back in this way.

Currently, I test against the title ', but I think it will be redundant, because the title can change in the future, and in that regard, the examination should still end.

about something like this:

  $ response = $ This- & gt; Call (...); $ View = $ response- & gt; Original; $ This- & gt; AssertSame ('user / index', $ view-> getName ());   

Similarly, you can use getPath () etc. on example.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -