title: Laravel test. assert exact JSON structure
body: <p>I have a laravel API project. There is a lot security data, that shouldn't be shown for users in API responses. I need some way to write tests where I can get <code>true</code> if only the response structure is exact same as a pre-set structure in test. </p>
  
  <p>So, if my test structure is <code>$structure = [ 'data' =&gt; ['_id', 'user' =&gt; ['name', 'email], 'title'];</code> but in response I'm recieveing more or less fields, I need this test to be failed.  </p>
  
  <p>In a docs I've found only: </p>
  
  <p><code>assertJson</code> - expecting for exact key => values, but I need a keys only;
  <code>assertJsonStructure</code> - returns true even if some fields missing or response contains some other fields.  </p>