TheSeer\phpDox\DocBlock\Factory::verifyType
Verify the type of the given item matches the expected one.
Signature
protected function verifyType(mixed
$item,
[string
$type = 'string'] )
Parameters
$item
—
mixed
$type
—
string
Errors/Exceptions
-
FactoryException
- in case the item type and the expected type do not match.
Test Coverage
Information
- Coverage: 11/13 Lines (84.615384615385%)
- Tests: 6
- Passed: 6 (100%)
Tests
- [ PASSED ] — TheSeer\phpDox\Tests\Unit\DocBlock\FactoryTest::testAddParserFactory
- [ PASSED ] — TheSeer\phpDox\Tests\Unit\DocBlock\FactoryTest::testAddParserFactoryExpectingFactoryException
- [ PASSED ] — TheSeer\phpDox\Tests\Unit\DocBlock\FactoryTest::testAddParserClass
- [ PASSED ] — TheSeer\phpDox\Tests\Unit\DocBlock\FactoryTest::testAddParserClassExpectingFactoryException with data set "wrong annotation type"
- [ PASSED ] — TheSeer\phpDox\Tests\Unit\DocBlock\FactoryTest::testAddParserClassExpectingFactoryException with data set "wrong classname type"
- [ PASSED ] — TheSeer\phpDox\Tests\Integration\DocBlock\FactoryTest::testGetInstanceByMapHandlingAFactory