Skip to content

docs: fix links #5367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions user_guide_src/source/concepts/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ OWASP recommendations
CodeIgniter provisions
----------------------

- `HTTP library <../incoming/incomingrequest.html>`_ provides for input field filtering & content metadata
- :doc:`HTTP library <../incoming/incomingrequest>` provides for input field filtering & content metadata
- Form validation library

*********************************************
Expand All @@ -56,7 +56,7 @@ OWASP recommendations
CodeIgniter provisions
----------------------

- `Session <../libraries/sessions.html>`_ library
- :doc:`Session <../libraries/sessions>` library
- :doc:`Security </libraries/security>` library provides for CSRF validation
- Easy to add third party authentication

Expand Down Expand Up @@ -217,5 +217,5 @@ OWASP recommendations
CodeIgniter provisions
----------------------

- `HTTP library <../incoming/incomingrequest.html>`_ provides for ...
- `Session <../libraries/sessions.html>`_ library provides flashdata
- :doc:`HTTP library <../incoming/incomingrequest>` provides for ...
- :doc:`Session <../libraries/sessions>` library provides flashdata
2 changes: 1 addition & 1 deletion user_guide_src/source/concepts/structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ Modifying Directory Locations
If you've relocated any of the main directories, you can change the configuration
settings inside **app/Config/Paths.php**.

Please read `Managing your Applications <../general/managing_apps.html>`_
Please read :doc:`Managing your Applications <../general/managing_apps>`.
10 changes: 6 additions & 4 deletions user_guide_src/source/incoming/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@ extensive set of routes that all share the opening string, like when building an

This would prefix the 'users' and 'blog" URIs with "admin", handling URLs like ``/admin/users`` and ``/admin/blog``.

If you need to assign options to a group, like a `namespace <#assigning-namespace>`_, do it before the callback::
If you need to assign options to a group, like a :ref:`assigning-namespace`, do it before the callback::

$routes->group('api', ['namespace' => 'App\API\v1'], function ($routes) {
$routes->resource('users');
});

This would handle a resource route to the ``App\API\v1\Users`` controller with the ``/api/users`` URI.

You can also use a specific `filter <filters.html>`_ for a group of routes. This will always
You can also use a specific :doc:`filter <filters>` for a group of routes. This will always
run the filter before or after the controller. This is especially handy during authentication or api logging::

$routes->group('api', ['filter' => 'api-auth'], function ($routes) {
Expand Down Expand Up @@ -338,7 +338,7 @@ available from the command line::
Global Options
==============

All of the methods for creating a route (add, get, post, `resource <restful.html>`_ etc) can take an array of options that
All of the methods for creating a route (add, get, post, :doc:`resource <restful>` etc) can take an array of options that
can modify the generated routes, or further restrict them. The ``$options`` array is always the last parameter::

$routes->add('from', 'to', $options);
Expand All @@ -363,7 +363,7 @@ The value for the filter can be a string or an array of strings:
* matching the aliases defined in **app/Config/Filters.php**.
* filter classnames

See `Controller filters <filters.html>`_ for more information on setting up filters.
See :doc:`Controller filters <filters>` for more information on setting up filters.

.. Warning:: If you set filters to routes in **app/Config/Routes.php**
(not in **app/Config/Filters.php**), it is recommended to disable auto-routing.
Expand Down Expand Up @@ -396,6 +396,8 @@ You specify an array for the filter value::

$routes->add('admin',' AdminController::index', ['filter' => ['admin-auth', \App\Filters\SomeFilter::class]]);

.. _assigning-namespace:

Assigning Namespace
-------------------

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/installing_manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ will be your public-facing document root. Do not change anything inside the ``sy
folder!

.. note:: This is the installation technique closest to that described
for `CodeIgniter 3 <https://codeigniter.com/user_guide/installation/index.html>`_.
for `CodeIgniter 3 <https://codeigniter.com/userguide3/installation/index.html>`_.

Installation
============
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/installation/upgrade_415.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ CURLRequest header change
In the previous version, if you didn't provide your own headers, ``CURLRequest`` would send the request-headers from the browser.
The bug was fixed. If your requests depend on the headers, your requests might fail after upgrading.
In this case, add the necessary headers manually.
See `CURLRequest Class <../libraries/curlrequest.html#headers>`_ for how to add.
See :ref:`CURLRequest Class <curlrequest-request-options-headers>` for how to add.

Query Builder changes
---------------------
Expand Down
2 changes: 2 additions & 0 deletions user_guide_src/source/libraries/curlrequest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,8 @@ if it's not already set::
Use ``form_params`` for ``application/x-www-form-urlencoded`` request, and ``multipart`` for ``multipart/form-data``
requests.

.. _curlrequest-request-options-headers:

headers
=======

Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/testing/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Testing Controllers

Testing your controllers is made convenient with a couple of new helper classes and traits. When testing controllers,
you can execute the code within a controller, without first running through the entire application bootstrap process.
Often times, using the `Feature Testing tools <feature.html>`_ will be simpler, but this functionality is here in
Often times, using the :doc:`Feature Testing tools <feature>` will be simpler, but this functionality is here in
case you need it.

.. note:: Because the entire framework has not been bootstrapped, there will be times when you cannot test a controller
Expand Down Expand Up @@ -161,7 +161,7 @@ you need to set a JSON value as the body. The only parameter is a string that re
Checking the Response
=====================

``ControllerTestTrait::execute()`` returns an instance of a ``TestResponse``. See `Testing Responses <response.html>`_ on
``ControllerTestTrait::execute()`` returns an instance of a ``TestResponse``. See :doc:`Testing Responses <response>` on
how to use this class to perform additional assertions and verification in your test cases.

Filter Testing
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/testing/feature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,5 @@ the Content-Type header for you so if you need that, you can set it with the ``w
Checking the Response
=====================

``FeatureTestTrait::call()`` returns an instance of a ``TestResponse``. See `Testing Responses <response.html>`_ on
``FeatureTestTrait::call()`` returns an instance of a ``TestResponse``. See :doc:`Testing Responses <response>` on
how to use this class to perform additional assertions and verification in your test cases.
6 changes: 3 additions & 3 deletions user_guide_src/source/testing/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ have the correct namespace relative to ``App``.

.. note:: Namespaces are not strictly required for test classes, but they are helpful to ensure no class names collide.

When testing database results, you must use the `DatabaseTestTrait <database.html>`_ in your class.
When testing database results, you must use the :doc:`DatabaseTestTrait <database>` in your class.

Staging
-------
Expand Down Expand Up @@ -216,7 +216,7 @@ Ensure that a header or cookie was actually emitted::
$this->assertHeaderEmitted("Set-Cookie: foo=bar");

Note: the test case with this should be `run as a separate process
in PHPunit <https://phpunit.readthedocs.io/en/7.4/annotations.html#runinseparateprocess>`_.
in PHPunit <https://phpunit.readthedocs.io/en/9.5/annotations.html#runinseparateprocess>`_.

**assertHeaderNotEmitted($header, $ignoreCase = false)**

Expand All @@ -231,7 +231,7 @@ Ensure that a header or cookie was not emitted::
$this->assertHeaderNotEmitted("Set-Cookie: banana");

Note: the test case with this should be `run as a separate process
in PHPunit <https://phpunit.readthedocs.io/en/7.4/annotations.html#runinseparateprocess>`_.
in PHPunit <https://phpunit.readthedocs.io/en/9.5/annotations.html#runinseparateprocess>`_.

**assertCloseEnough($expected, $actual, $message = '', $tolerance = 1)**

Expand Down
6 changes: 5 additions & 1 deletion user_guide_src/source/testing/response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ Testing Responses

The ``TestResponse`` class provides a number of helpful functions for parsing and testing responses
from your test cases. Usually a ``TestResponse`` will be provided for you as a result of your
`Controller Tests <controllers.html>`_ or `HTTP Feature Tests <feature.html>`_, but you can always
:doc:`Controller Tests <controllers>` or :doc:`HTTP Feature Tests <feature>`, but you can always
create your own directly using any ``ResponseInterface``::

$result = new \CodeIgniter\Test\TestResponse($response);
$result->assertOK();

.. contents::
:local:
:depth: 2

Testing the Response
====================

Expand Down