jlappano
jlappano
Reputation Top 5%
jlappano lappano
2 Snippets  (229th place)
Published
1 Channel
Created
1 Channel
Following
81 points  (331st place)
Reputation
Junior Code Generator
Junior Popular Coder
Junior Autobiographer
Junior Snip2Coder
Junior Famous Coder

Recent Snippets See all snippets by jlappano

public by jlappano  1420  0  2  0

Init remote modal

        <!-- Describes this modal header -->
        <div class="modal fade" id=“my-specific-id” tabindex="-1" role="dialog" aria-hidden="true" data-remote="{{ path(‘my_path_route’, {‘stub’: value}) }}">
            <div class="modal-dialog modal-settings">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-fw fa-times"></i></button>
                        <h1 class="modal-title">Modal Title<i class="loading fa fa-refresh fa-spin"></i></h1>
                    </div>
                    <div class="modal-body">
       			 <!-- Leave the Body Blank -->
		   </div>
                </div>
            </div>
        </div>
;

public by jlappano  3241  1  5  2

Check Content and Status Code in PHP Unit

        $client->request('GET', ‘/create/adviseeSet’);

        $content = $client->getResponse()->getContent();
        $status = $client->getResponse()->getStatusCode();

        $this->assertEquals('shmee', $content);
        $this->assertEquals(200, $status);


Gives a nice failure message which prints out content and status code 
;