for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace RazonYang\Yii2\JSend\Tests;
use PHPUnit\Framework\TestCase;
use RazonYang\JSend\Exception;
class ExceptionTest extends TestCase
{
/**
* @dataProvider dataProviderSetUp
*/
public function testSetUp($message, $code, $previous = null, $data = null): void
$e = new Exception($message, $code, $previous, $data);
$this->assertSame($message, $e->getMessage());
$this->assertSame($code, $e->getCode());
$this->assertSame($previous, $e->getPrevious());
$this->assertSame($data, $e->getData());
}
public function dataProviderSetUp(): array
return [
['foo', 0, null, null],
['bar', 1, new \Exception(), 'fuzz'],
];