PHP code example of tyler36 / phpunit-helper-traits

1. Go to this page and download the library: Download tyler36/phpunit-helper-traits 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/ */

    

tyler36 / phpunit-helper-traits example snippets

$this->checkAssetExists($filename);
$this->checkAssetExists("/robots.txt");
$this->visit('/home')->checkAssetExists("/images/logo.jpg")
$this->countElements($selector, $count);
$this->countElements('.card', 3);
$this->disableExceptionHandling()

$this->asGuest();

$this->asMember();

$this->seeEmailWasNotSent();

$this->seeEmailWasSent();

$this->seeEmailsSent(3)

$this->seeEmailTo($recipient);

$this->seeEmailNotTo($recipient);

$this->seeEmailFrom($sender);

$this->seeEmailNotFrom($sender);

$this->seeEmailEquals($body);

$this->seeEmailNotEquals($body);

$this->seeEmailContains($excerpt);

$this->seeEmailNotContains($excerpt);

$this->seeEmailSubjectEquals($subject);

$this->seeEmailSubjectNotEquals($subject);

$this->seeEmailSubjectContains($fragment);

$this->seeEmailSubjectNotContains($fragment);
$this->prepareUpload($file)
$this->prepareUpload('./avatar.jpg');