PHP code example of kerasai / behat-tokenizer
1. Go to this page and download the library: Download kerasai/behat-tokenizer 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/ */
kerasai / behat-tokenizer example snippets
use \Kerasai\Behat\Tokenizer\TokenizerAwareInterface;
use \Kerasai\Behat\Tokenizer\TokenizerAwareTrait;
class MyContext implements TokenizerAwareInterface {
use TokenizerAwareTrait;
/**
* @Given something named :arg1
*/
public function AssertSomethingNamed($arg1) {
$something = new Something();
$something->setName($arg1);
$something->save();
$this->tokenizer->setToken("[something:$arg1]", $something->id());
}
}