classNotNullViolationException
final class NotNullViolationException
extends SimulationException
Exception thrown when a NOT NULL constraint is violated.
Methods§
public function __construct(string $sql, string $tableName, string $columnName)Parameters
$sql | string | The SQL statement. |
$tableName | string | The name of the table. |
$columnName | string | The name of the column that cannot be NULL. |
Test cases 4
Calls 2
- static-call SimulationException::__construct() line 34
- function-call
sprintfline 34
public function getSql(): stringGet the SQL statement.
Returns
stringTest cases 1
NotNullViolationExceptionTest::testGetSqlReturnsOriginalSqlcovers and calls
public function getTableName(): stringGet the name of the table.
Returns
stringTest cases 1
NotNullViolationExceptionTest::testGetTableNameReturnsTableNamecovers and calls
public function getColumnName(): stringGet the name of the column that cannot be NULL.
Returns
stringTest cases 1
NotNullViolationExceptionTest::testGetColumnNameReturnsColumnNamecovers and calls
Private surface 3§
Implementation details, listed for orientation only.
private string $sqlprivate string $tableNameprivate string $columnNameTest cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
NotNullViolationExceptionTest::testGetColumnNameReturnsColumnNamecovers and callsNotNullViolationExceptionTest::testGetMessageReturnsFormattedMessagecovers and callsNotNullViolationExceptionTest::testGetSqlReturnsOriginalSqlcovers and callsNotNullViolationExceptionTest::testGetTableNameReturnsTableNamecovers and calls