PHP code example of metadrop / behat-contexts

1. Go to this page and download the library: Download metadrop/behat-contexts library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

metadrop / behat-contexts example snippets


/**
 * Example of implementation elementShouldBeInPosition on a custom step.
 *
 * @Then the card on the infinite scroll view with title :title should be in position :position.
 */
public function theCardWithTitleShouldBeInPositionExample(string $title, string $position) {
  $this->elementShouldBeInPosition('item-list-css-selector', $title, 'views-infinite-scroll-content-wrapper', $position);
}
yaml
- Metadrop\Behat\Context\LogsContext:
    parameters:
      base_url: 'http://example.docker.localhost:8000'
      types:
        - php
        - cron
      levels:
        - ERROR
        - WARNING
        - NOTICE
      limit: 100
      path: '/var/www/html/reports/behat/dblog'
      write_report: false