Elgg\ActionsServiceTest::testCanNotExecuteActionWithoutActionFile PHP Method

testCanNotExecuteActionWithoutActionFile() public method

    public function testCanNotExecuteActionWithoutActionFile()
    {
        $this->request = $this->prepareHttpRequest('action/no_file', 'POST', [], false, true);
        $this->assertTrue($this->actions->register('no_file', "{$this->actionsDir}/no_file.php", 'public'));
        $this->createService();
        $result = $this->actions->execute('no_file', 'referrer');
        $this->assertInstanceOf(ErrorResponse::class, $result);
        $this->assertEquals(ELGG_HTTP_NOT_IMPLEMENTED, $result->getStatusCode());
        $this->assertEquals(elgg_echo('actionnotfound', ['no_file']), $result->getContent());
        $this->assertEquals('referrer', $result->getForwardURL());
    }
ActionsServiceTest