kahlan/kahlan

View on GitHub
src/Matcher/ToBeTruthy.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
<?php
namespace Kahlan\Matcher;

class ToBeTruthy extends ToEqual
{
    /**
     * Expect that `$actual` is truthy.
     *
     * @param  mixed $actual   The actual value.
     * @param  mixed $expected The expected value.
     * @return boolean
     */
    public static function match($actual, $expected = true)
    {
        return parent::match($actual, true);
    }

    /**
     * Returns the description message.
     *
     * @return string The description message.
     */
    public static function description()
    {
        return "be truthy.";
    }
}