for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace MyTester;
use MyTester\Attributes\TestSuite;
/**
* Test suite for class JobResult
*
* @author Jakub Konečný
*/
#[TestSuite("JobResultTest")]
final class JobResultTest extends TestCase
{
public function testFromJob(): void
$job = new Job("Test Job", function () {
});
$job->execute();
$this->assertSame(JobResult::PASSED, JobResult::fromJob($job));
echo "Test failed. Reason";
$this->assertSame(JobResult::FAILED, JobResult::fromJob($job));
echo "Warning: Text";
$this->assertSame(JobResult::WARNING, JobResult::fromJob($job));
}