Crud\Test\TestCase\Action\ViewActionTest::testGet PHP Method

testGet() public method

Test the normal HTTP flow for all HTTP verbs
public testGet ( $method ) : void
return void
    public function testGet($method)
    {
        $this->_eventManager->on('Dispatcher.invokeController', ['priority' => 1000], function ($event) {
            $this->_subscribeToEvents($this->_controller);
        });
        $this->{$method}('/blogs/view/1');
        $this->assertEvents(['beforeFind', 'afterFind', 'beforeRender']);
        $this->assertNotNull($this->viewVariable('viewVar'));
        $this->assertNotNull($this->viewVariable('blog'));
        $this->assertNotNull($this->viewVariable('success'));
    }