classUnknownSchemaException
final class UnknownSchemaException
extends SimulationException
Exception thrown when a query references unknown tables or columns.
Methods§
public function __construct(string $sql, string $identifier, string $identifierType = 'table')Parameters
$sql | string | The SQL statement. |
$identifier | string | The unknown identifier. |
$identifierType | string | The type of identifier ('table' or 'column'). |
Test cases 7
UnknownSchemaExceptionTest::testGetIdentifierReturnsIdentifiercoversUnknownSchemaExceptionTest::testGetIdentifierTypeDefaultsToTablecoversUnknownSchemaExceptionTest::testGetIdentifierTypeReturnsIdentifierTypecoversUnknownSchemaExceptionTest::testGetMessageDefaultsToTablecoversUnknownSchemaExceptionTest::testGetMessageReturnsFormattedMessageForColumncoversUnknownSchemaExceptionTest::testGetMessageReturnsFormattedMessageForTablecoversUnknownSchemaExceptionTest::testGetSqlReturnsOriginalSqlcovers
Calls 2
- static-call SimulationException::__construct() line 34
- function-call
sprintfline 34
public function getSql(): stringGet the SQL statement.
Returns
stringTest cases 1
UnknownSchemaExceptionTest::testGetSqlReturnsOriginalSqlcovers and calls
public function getIdentifier(): stringGet the unknown identifier.
Returns
stringTest cases 1
UnknownSchemaExceptionTest::testGetIdentifierReturnsIdentifiercovers and calls
Called from 1
public function getIdentifierType(): stringGet the type of identifier.
Returns
stringTest cases 2
UnknownSchemaExceptionTest::testGetIdentifierTypeDefaultsToTablecovers and callsUnknownSchemaExceptionTest::testGetIdentifierTypeReturnsIdentifierTypecovers and calls
Private surface 3§
Implementation details, listed for orientation only.
private string $sqlprivate string $identifierprivate string $identifierTypeTest cases 11§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
UnknownSchemaExceptionTest::testGetIdentifierReturnsIdentifiercovers and callsUnknownSchemaExceptionTest::testGetIdentifierTypeDefaultsToTablecovers and callsUnknownSchemaExceptionTest::testGetIdentifierTypeReturnsIdentifierTypecovers and callsUnknownSchemaExceptionTest::testGetMessageDefaultsToTablecovers and callsUnknownSchemaExceptionTest::testGetMessageReturnsFormattedMessageForColumncovers and callsUnknownSchemaExceptionTest::testGetMessageReturnsFormattedMessageForTablecovers and callsUnknownSchemaExceptionTest::testGetSqlReturnsOriginalSqlcovers and calls
Other tests reaching this symbol 4
RewriteRefusalTest::testForUnknownSchemaLetsTheStatementThroughWhereTheCallerAsksForThatcallsRewriteRefusalTest::testForUnknownSchemaRaisesWhereTheCallerAskedToBeToldcallsRewriteRefusalTest::testForUnknownSchemaReadsNothingBackWhereTheCallerAsksForThatcallsRewriteRefusalTest::testForUnknownSchemaSaysSomethingWhereTheCallerAskedToBeNoticedcalls