Download the PHP package spinen/spinen-php-web-tester without Composer

On this page you can find all versions of the php package spinen/spinen-php-web-tester. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

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.
Please rate this library. Is it a good library?

Informations about the package spinen-php-web-tester

Simple Tester for PHP web sites

We were wanting a testing framework very similar to Laravel's to run acceptance-like tests on basic php sites. This was built to help a college class learn about TDD in a dynamic content class. We wanted to use Laravel's constraints that are in the Foundation section, but they no longer subsplit that code out into a read-only Illuminate repository. We are requiring the Laravel Framework just to get the constraints, but it's going to pull in many packages. Therefore, only require this package in the dev section.

Credits

There are huge sections of the code that is in PageAssertions class that is a complete copy & paste from Laravel's InteractsWithPages class. We would have just used the class, but it relies too much on booting Laravel, so we wrote our own class & just pulled over the assertions that we could reuse.

Installation

Usage

You can either extend an abstract class that we provide or use the traits that provides the functionality.

  1. Extend Spinen\SimplePhpTester\TestCase so that you will have access to the test.
  2. Mixin the test by useing Spinen\SimplePhpTester\Browser and Spinen\SimplePhpTester\PageAssertions in your testfile.

Configuration

The test assumes that your web files are in a directory named public. If that is not the case, then you have 3 options...

  1. Add a protected property to your test class named $web_root with the name of the directory (i.e. protected $web_root = 'web';).
  2. Call setWebRoot with the directory relative to the directory that you are running phpunit (i.e. $this->setWebRoot('web');).
  3. Add a protected method to your test class named determinedFullPath that builds the full path to the directory of the script being tested.

Assertions

Here is a list of the assertions that are provided...

Example Test

Troubleshooting

You can call the dump method on your chain of commands to print out the rendered HTML.


All versions of spinen-php-web-tester with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
laravel/framework Version 5.3.*
symfony/dom-crawler Version ^3.1
symfony/process Version ^3.1
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 spinen/spinen-php-web-tester contains the following files

Loading the files please wait ....