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

testActionGetWithQueryArgs() public method

Providing ?name=test should fill out the value in the 'name' input field
public testActionGetWithQueryArgs ( ) : void
return void
    public function testActionGetWithQueryArgs()
    {
        $this->get('/blogs/add?name=test');
        $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" value="test"/>';
        $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');
    }