Crud\Test\TestCase\Action\AddActionTest::testActionGet PHP Method

testActionGet() public method

Test the normal HTTP GET flow of _get
public testActionGet ( ) : void
return void
    public function testActionGet()
    {
        $this->get('/blogs/add');
        $result = $this->_response->body();
        $expected = '<legend>New Blog</legend>';
        $this->assertContains($expected, $result, 'legend do not match the expected value');
        $expected = '<input type="hidden" name="id" id="id"/>';
        $this->assertContains($expected, $result, '"id" do not match the expected value');
        $expected = '<input type="text" name="name" maxlength="255" id="name"/>';
        $this->assertContains($expected, $result, '"name" do not match the expected value');
        $expected = '<textarea name="body" id="body" rows="5"></textarea>';
        $this->assertContains($expected, $result, '"body" do not match the expected value');
    }