Crud\Test\TestCase\Action\LookupActionTest::testGetWithCustomParams PHP Method

testGetWithCustomParams() public method

Test changing the id field and value field
public testGetWithCustomParams ( ) : void
return void
    public function testGetWithCustomParams()
    {
        $this->_eventManager->on('Dispatcher.invokeController', ['priority' => 1000], function () {
            $this->_subscribeToEvents($this->_controller);
        });
        $expected = ['1st post' => '1', '2nd post' => '2', '3rd post' => '3'];
        $this->get('/blogs/lookup.json?id=name&value=id');
        $this->assertEvents(['beforeLookup', 'afterLookup', 'beforeRender']);
        $this->assertNotNull($this->viewVariable('viewVar'));
        $this->assertNotNull($this->viewVariable('blogs'));
        $this->assertNotNull($this->viewVariable('success'));
        $this->assertEquals($expected, $this->viewVariable('blogs')->toArray());
    }