PHPackages                             lovers-of-behat/table-extension - 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. lovers-of-behat/table-extension

ActiveBehat-extension

lovers-of-behat/table-extension
===============================

Behat extension to inspect HTML tables

1.5.2(1y ago)797.5k↓25%5[2 issues](https://github.com/LoversOfBehat/TableExtension/issues)1MITPHPPHP &gt;=7.1

Since May 4Pushed 1y ago7 watchersCompare

[ Source](https://github.com/LoversOfBehat/TableExtension)[ Packagist](https://packagist.org/packages/lovers-of-behat/table-extension)[ RSS](/packages/lovers-of-behat-table-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (11)Used By (1)

TableExtension
==============

[](#tableextension)

This library provides step definitions for checking HTML5 tables in Behat scenarios.

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

[](#installation)

```
$ composer require lovers-of-behat/table-extension

```

Configuration
-------------

[](#configuration)

Add the extension and context to your test suite in `behat.yml`:

```
suites:
  default:
    contexts:
      - LoversOfBehat\TableExtension\Context\TableContext:
  extensions:
    LoversOfBehat\TableExtension:
      table_map:
        'Users': 'page.users .main-content table'
        'Country codes': 'table#country-codes'

```

### Options

[](#options)

- `tableMap`: Maps human readable table names to the CSS selectors that identify the tables in the web page. This allows you to use the human readable names in your Behat scenarios.

Usage
-----

[](#usage)

Given this example table:

  Name Department Contact information   Office Position E-mail address Phone number   **Lelisa Ericsson** Healthcare Nurse lelisa@example.com 555-1234567   **Genista Sumner** Science Anthropologist genista@example.com 555-987654 And we have added the table to the `table_map` in `behat.yml`:

```
suites:
  extensions:
    LoversOfBehat\TableExtension:
      table_map:
        'Employees': '#employees'

```

Then we can use steps such as these to check the table:

```
# Check that the table is present on the page.
Then I should see the Employees table

# Check basic properties.
And the Employees table should have 5 columns

# Check the contents of the table. Cells that contain colspans and
# rowspans can be left empty.
And the Employees table should contain:
  | Name            | Department |                | Contact information |              |
  |                 | Office     | Position       | E-mail address      | Phone number |
  | Lelisa Ericsson | Healthcare | Nurse          | lelisa@example.com  | 555-1234567  |
  | Genista Sumner  | Science    | Anthropologist | genista@example.com | 555-987654   |

# The same step definition can be used to check partial data, as long as
# it is in a consecutive block of cells:
And the Employees table should contain:
  | Lelisa Ericsson | Healthcare | Nurse          |
  | Genista Sumner  | Science    | Anthropologist |

# Check non-consecutive columns by identifying them with the header
# text. This works even though the headers are in different rows in the
# original table.
And the Employees table should contain the following columns:
  | Name            | Office     | Phone number |
  | Lelisa Ericsson | Healthcare | 555-1234567  |
  | Genista Sumner  | Science    | 555-987654   |

```

For a more complete example, see [tables.feature](features/tables.feature). Or check [TableContext.php](src/Context/TableContext.php)itself for the full list of available steps.

Development
-----------

[](#development)

Running tests locally:

```
$ git clone git@github.com:LoversOfBehat/TableExtension.git table-extension
$ cd table-extension
$ composer install
$ php -S localhost:8000 -t fixtures &
$ ./vendor/bin/behat

```

Credits
-------

[](#credits)

Development of this extension has been sponsored by the Directorate-General for Informatics (DIGIT) of the European Commission, as part of the OpenEuropa initiative.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 57.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 ~250 days

Recently: every ~218 days

Total

10

Last Release

679d ago

PHP version history (2 changes)1.0.0PHP ~7.1

1.3.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e8002bbd41b86bc1aa39bfd23074f88c0816d46e511fefa26701d176286d396?d=identicon)[pfrenssen](/maintainers/pfrenssen)

---

Top Contributors

[![pfrenssen](https://avatars.githubusercontent.com/u/442924?v=4)](https://github.com/pfrenssen "pfrenssen (34 commits)")[![claudiu-cristea](https://avatars.githubusercontent.com/u/473868?v=4)](https://github.com/claudiu-cristea "claudiu-cristea (18 commits)")[![idimopoulos](https://avatars.githubusercontent.com/u/12171851?v=4)](https://github.com/idimopoulos "idimopoulos (4 commits)")[![22Alexandra](https://avatars.githubusercontent.com/u/22908988?v=4)](https://github.com/22Alexandra "22Alexandra (1 commits)")[![brummbar](https://avatars.githubusercontent.com/u/8488617?v=4)](https://github.com/brummbar "brummbar (1 commits)")[![nagyad](https://avatars.githubusercontent.com/u/22004498?v=4)](https://github.com/nagyad "nagyad (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lovers-of-behat-table-extension/health.svg)

```
[![Health](https://phpackages.com/badges/lovers-of-behat-table-extension/health.svg)](https://phpackages.com/packages/lovers-of-behat-table-extension)
```

###  Alternatives

[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k172.9M1.8k](/packages/symfony-security-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[drupal/drupal-extension

Drupal extension for Behat

22215.1M147](/packages/drupal-drupal-extension)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[symfony/ux-twig-component

Twig components for Symfony

21914.8M162](/packages/symfony-ux-twig-component)

PHPackages © 2026

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