Download the PHP
package genesis/test-routing without Composer
On this page you can find all versions of the php package
genesis/test-routing. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor genesis Package test-routing Short Description A simple routing extension to work with humanly friendly page names that can be extrapolated onto other routing systems. License
MIT
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Simple routing to use named pages instead of urls.
FeatureContext step definitions:
Given I am on the :page page
Given I am on the :page page on :device
Given I am on the :page with the following params:
Then I should be on the :arg1 page
Features in Genesis\TestRouting\RoutingContxt class:
::getRoute() accepts a callback function that allows manipulation of url before returning final url.
::setAllRoutesFromExternalSource() provides a bridge for other routing mechanisms in place. You can re-use your existing application routing configuration.
::registerFile() register an external file containing all your route definitions. This call is typically contained in one of your context constructor files.
Features in RouteAssert class:
::page() assert whether a page resolved correctly to a url.
::uri() assert that you are on the correct uri.
::queryParams() assert that the a url holds the correct query params.
Release detail:
Major: Released first version of test routing.
Minor: Assertion library added. New calls for building up URL's.
Patch: Fix callable method break if no overriding method is defined.
The routesFilePath should be a php file containing an array of routes like so:
You will be using the names assigned to routes to reference them in the feature files using the step definitions provided.
PHP - Adding a route
Get a route back
Register the file that contains all your routing.
More advanced form of get
Re-using your application routing configuration
Integrating with the behat-sql-extension
Two ways to do this, either using the method below or extending the RoutingContext file to provide just the callback
while retaining all the rest of the features:
Method 1:
Then register the above RoutingContext in behat.yml instead of the one provided by the extension.
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package genesis/test-routing contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.