assert

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks an assertion
<?php assert(mixed $assertion, Throwable|string|null $description = null): bool
<?php         }

    }



    assert(isset($getopt['status-file']) && is_string($getopt['status-file']));

    $statusFile = fopen($getopt['status-file'], 'wb');

    assert(is_resource($statusFile));
<?php     assert(isset($getopt['status-file']) && is_string($getopt['status-file']));

    $statusFile = fopen($getopt['status-file'], 'wb');

    assert(is_resource($statusFile));



    assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));
<?php     $statusFile = fopen($getopt['status-file'], 'wb');

    assert(is_resource($statusFile));



    assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));
<?php     assert(is_resource($statusFile));



    assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));
<?php     assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));
<?php     assert(isset($getopt['progress-file']) && is_string($getopt['progress-file']));

    assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));



    assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']));
<?php     assert(isset($getopt['unexpected-output-file']) && is_string($getopt['unexpected-output-file']));

    assert(isset($getopt['testresult-file']) && is_string($getopt['testresult-file']));

    assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));



    assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']));

    $phpunitArgv = unserialize($getopt['phpunit-argv'], ['allowed_classes' => false]);
<?php     assert(! isset($getopt['teamcity-file']) || is_string($getopt['teamcity-file']));

    assert(! isset($getopt['testdox-file']) || is_string($getopt['testdox-file']));



    assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']));

    $phpunitArgv = unserialize($getopt['phpunit-argv'], ['allowed_classes' => false]);

    assert(is_array($phpunitArgv));
<?php     assert(isset($getopt['phpunit-argv']) && is_string($getopt['phpunit-argv']));

    $phpunitArgv = unserialize($getopt['phpunit-argv'], ['allowed_classes' => false]);

    assert(is_array($phpunitArgv));



    $bootPest();
<?php     private function handleFinish(Info $telemetryInfo, int $numberOfAssertionsPerformed): void

    {

        assert($this->currentTestCase !== null);

        assert($this->time !== null);



        $time = $telemetryInfo->time()->duration($this->time)->asFloat();
<?php     private function handleFinish(Info $telemetryInfo, int $numberOfAssertionsPerformed): void

    {

        assert($this->currentTestCase !== null);

        assert($this->time !== null);



        $time = $telemetryInfo->time()->duration($this->time)->asFloat();
<?php             $this->createTestCase($event);

        }



        assert($this->currentTestCase !== null);



        $buffer = $this->converter->getTestCaseMethodName($event->test()); // pest-changed
<?php             $this->createTestCase($event);

        }



        assert($this->currentTestCase !== null);



        $skipped = $this->document->createElement('skipped');
<?php             return basename($test->file());

        }



        assert($test instanceof TestMethod);



        return sprintf(

            '%s::%s%s',
<?php             return basename($test->file());

        }



        assert($test instanceof TestMethod);



        if (! $test->testData()->hasDataFromDataProvider()) {

            return $test->methodName();