PHPackages                             igarastudio/visit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. igarastudio/visit

ActiveLibrary[Testing &amp; Quality](/categories/testing)

igarastudio/visit
=================

A library to simulate and test user visits using php-cgi

v0.1.8(3mo ago)2754↓58.3%1[1 PRs](https://github.com/igarastudio/visit/pulls)MITPHPCI passing

Since Feb 11Pushed 3mo agoCompare

[ Source](https://github.com/igarastudio/visit)[ Packagist](https://packagist.org/packages/igarastudio/visit)[ RSS](/packages/igarastudio-visit/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (3)Versions (11)Used By (0)

igarastudio/visit
=================

[](#igarastudiovisit)

With `visit` you can simulate your website navigation through `php-cgi` without running a web server or a web browser. It supports cookies so you can use your PHP session to simulate user logins, etc.

Example
-------

[](#example)

```
use PHPUnit\Framework\TestCase;

use IgaraStudio\Visit;
use function IgaraStudio\visit;

// If this test is in /tests/ and your index.php file in /public/ dir
Visit::$shared_options = [ 'docroot' => __DIR__ . '/../public',
                           'script' => __DIR__ . '/../public/index.php' ];

class UserLoginTest extends TestCase
{
  // Simulates a GET request to /login to check if the 'Login' text appears
  // in the page.
  public function testVisibleLoginButton(): void
  {
    visit('/login')->assertSee('Login');
  }

  // Simulates a POST request to /login with a specific form data, checks
  public function testInvalidLogin(): void
  {
    visit()
      ->post('/login', ['username' => 'invalid',
                        'password' => 'invalid'])
      ->assertSee('Invalid user or password');
  }

  // This login works because we process Cookie and Set-Cookie to keep the PHP
  // session in the same visit().
  public function testValidLogin(): void
  {
    visit()
      ->post('/login', ['username' => 'valid-username',
                        'password' => 'valid-password'])
      ->assertSee('Dashboard');
  }
}
```

Installation
------------

[](#installation)

You can add this library as a dependency to your project using [Composer](https://getcomposer.org/), generally you only need this library during development, for instance to run your project's test suite:

```
composer require --dev igarastudio/visit

```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance82

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 55.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

9

Last Release

95d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a8d82a91b23011a03809fa55a32181dd619cafbb1123a16a4f69d80079df216?d=identicon)[dacap](/maintainers/dacap)

---

Top Contributors

[![dacap](https://avatars.githubusercontent.com/u/39654?v=4)](https://github.com/dacap "dacap (10 commits)")[![martincapello](https://avatars.githubusercontent.com/u/5520828?v=4)](https://github.com/martincapello "martincapello (8 commits)")

### Embed Badge

![Health badge](/badges/igarastudio-visit/health.svg)

```
[![Health](https://phpackages.com/badges/igarastudio-visit/health.svg)](https://phpackages.com/packages/igarastudio-visit)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k136.1M986](/packages/brianium-paratest)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M343](/packages/drupal-core-dev)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

30314.4k7](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
