for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Zenstruck\Browser\Assertion;
use Behat\Mink\Exception\ExpectationException;
use Zenstruck\Assert\AssertionFailed;
/**
* @author Kevin Bond <[email protected]>
*
* @internal
*/
final class MinkAssertion
{
/** @var callable */
private $callback;
public function __construct(callable $callback)
$this->callback = $callback;
}
public function __invoke(): void
try {
($this->callback)();
} catch (ExpectationException $e) {
AssertionFailed::throw($e->getMessage());