src/Assert.php
public static function assertTrue($actual, string $message = '')
    {
        self::$count += 1;

        if ((bool)$actual) {
            return;
        }

        if (!$message) {
            $message = sprintf(
                'Failed asserting that %s is truthy',
                var_export($actual, true)
            );
        }
        throw new AssertionError($message);
    }
public static function assertTrue($actual, string $message = '')
    {
        self::$count += 1;

        if ((bool)$actual) {
            return;
        }

        if (!$message) {
            $message = sprintf(
                'Failed asserting that %s is truthy',
                var_export($actual, true)
            );
        }
        throw new AssertionError($message);
    }
public static function assertTrue ( $ actual , string $ message = '' ) { self :: $ count += 1 ; if ( ( bool ) $ actual ) { return ; } if ( ! $ message ) { $ message = sprintf ( 'Failed asserting that %s is truthy' , var_export ( $ actual , true ) ) ; } throw new AssertionError ( $ message ) ; }
Test if the value is truthy

@example
\Cundd\TestFlight\Assert::assertTrue(true);
\Cundd\TestFlight\Assert::assertTrue(1);
\Cundd\TestFlight\Assert::assertTrue(' ');
\Cundd\TestFlight\Assert::assertTrue('1');
\Cundd\TestFlight\Assert::assertTrue(new stdClass());
\Cundd\TestFlight\Assert::assertTrue([1]);
test_flight_throws(function() { \Cundd\TestFlight\Assert::assertTrue(false); });
test_flight_throws(function() { \Cundd\TestFlight\Assert::assertTrue(0); });
test_flight_throws(function() { \Cundd\TestFlight\Assert::assertTrue(''); });
test_flight_throws(function() { \Cundd\TestFlight\Assert::assertTrue(null); });
test_flight_throws(function() { \Cundd\TestFlight\Assert::assertTrue([]); });

@param mixed  $actual
@param string $message
@throws AssertionError if the value is false, null, 0, '', '0', ...
Test if the value is truthy