Lggr
Public Member Functions | Public Attributes | List of all members
ExceptionTest Class Reference
Inheritance diagram for ExceptionTest:
Inheritance graph
[legend]
Collaboration diagram for ExceptionTest:
Collaboration graph
[legend]

Public Member Functions

 testOne ()
 
 testTwo ()
 
 testThree ()
 
 testFour ()
 
 testFive ()
 
 testSix ()
 
 testSeven ()
 
 testEight ()
 
 testNine ()
 
 testSingleLine ()
 
 testUnknownConstants ()
 
 testWithRegexMessage ()
 
 testWithRegexMessageFromClassConstant ()
 
 testWithUnknowRegexMessageFromClassConstant ()
 
- Public Member Functions inherited from PHPUnit\Framework\TestCase
 __construct ($name=null, array $data=[], $dataName='')
 
 toString ()
 
 count ()
 
 getGroups ()
 
 setGroups (array $groups)
 
 getAnnotations ()
 
 getName ($withDataSet=true)
 
 getSize ()
 
 hasSize ()
 
 isSmall ()
 
 isMedium ()
 
 isLarge ()
 
 getActualOutput ()
 
 hasOutput ()
 
 doesNotPerformAssertions ()
 
 expectOutputRegex ($expectedRegex)
 
 expectOutputString ($expectedString)
 
 hasExpectationOnOutput ()
 
 getExpectedException ()
 
 getExpectedExceptionCode ()
 
 getExpectedExceptionMessage ()
 
 getExpectedExceptionMessageRegExp ()
 
 expectException ($exception)
 
 expectExceptionCode ($code)
 
 expectExceptionMessage ($message)
 
 expectExceptionMessageRegExp ($messageRegExp)
 
 expectExceptionObject (\Exception $exception)
 
 setRegisterMockObjectsFromTestArgumentsRecursively ($flag)
 
 setUseErrorHandler ($useErrorHandler)
 
 getStatus ()
 
 markAsRisky ()
 
 getStatusMessage ()
 
 hasFailed ()
 
 run (TestResult $result=null)
 
 runBare ()
 
 setName ($name)
 
 setDependencies (array $dependencies)
 
 hasDependencies ()
 
 setDependencyInput (array $dependencyInput)
 
 setBeStrictAboutChangesToGlobalState ($beStrictAboutChangesToGlobalState)
 
 setBackupGlobals ($backupGlobals)
 
 setBackupStaticAttributes ($backupStaticAttributes)
 
 setRunTestInSeparateProcess ($runTestInSeparateProcess)
 
 setRunClassInSeparateProcess ($runClassInSeparateProcess)
 
 setPreserveGlobalState ($preserveGlobalState)
 
 setInIsolation ($inIsolation)
 
 isInIsolation ()
 
 getResult ()
 
 setResult ($result)
 
 setOutputCallback ($callback)
 
 getTestResultObject ()
 
 setTestResultObject (TestResult $result)
 
 registerMockObject (MockObject $mockObject)
 
 getMockBuilder ($className)
 
 addToAssertionCount ($count)
 
 getNumAssertions ()
 
 usesDataProvider ()
 
 dataDescription ()
 
 dataName ()
 
 registerComparator (Comparator $comparator)
 
 getDataSetAsString ($includeData=true)
 

Public Attributes

const ERROR_MESSAGE = 'Exception message'
 
const ERROR_MESSAGE_REGEX = '#regex#'
 
const ERROR_CODE = 500
 

Additional Inherited Members

- Static Public Member Functions inherited from PHPUnit\Framework\TestCase
static any ()
 
static never ()
 
static atLeast ($requiredInvocations)
 
static atLeastOnce ()
 
static once ()
 
static exactly ($count)
 
static atMost ($allowedInvocations)
 
static at ($index)
 
static returnValue ($value)
 
static returnValueMap (array $valueMap)
 
static returnArgument ($argumentIndex)
 
static returnCallback ($callback)
 
static returnSelf ()
 
static throwException (Throwable $exception)
 
static onConsecutiveCalls ()
 
static setUpBeforeClass ()
 
static tearDownAfterClass ()
 
- Static Public Member Functions inherited from PHPUnit\Framework\Assert
static assertArrayHasKey ($key, $array, $message='')
 
static assertArraySubset ($subset, $array, $strict=false, $message='')
 
static assertArrayNotHasKey ($key, $array, $message='')
 
static assertContains ($needle, $haystack, $message='', $ignoreCase=false, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static assertAttributeContains ($needle, $haystackAttributeName, $haystackClassOrObject, $message='', $ignoreCase=false, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static assertNotContains ($needle, $haystack, $message='', $ignoreCase=false, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static assertAttributeNotContains ($needle, $haystackAttributeName, $haystackClassOrObject, $message='', $ignoreCase=false, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static assertContainsOnly ($type, $haystack, $isNativeType=null, $message='')
 
static assertContainsOnlyInstancesOf ($classname, $haystack, $message='')
 
static assertAttributeContainsOnly ($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType=null, $message='')
 
static assertNotContainsOnly ($type, $haystack, $isNativeType=null, $message='')
 
static assertAttributeNotContainsOnly ($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType=null, $message='')
 
static assertCount ($expectedCount, $haystack, $message='')
 
static assertAttributeCount ($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message='')
 
static assertNotCount ($expectedCount, $haystack, $message='')
 
static assertAttributeNotCount ($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message='')
 
static assertEquals ($expected, $actual, $message='', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static assertAttributeEquals ($expected, $actualAttributeName, $actualClassOrObject, $message='', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static assertNotEquals ($expected, $actual, $message='', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static assertAttributeNotEquals ($expected, $actualAttributeName, $actualClassOrObject, $message='', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static assertEmpty ($actual, $message='')
 
static assertAttributeEmpty ($haystackAttributeName, $haystackClassOrObject, $message='')
 
static assertNotEmpty ($actual, $message='')
 
static assertAttributeNotEmpty ($haystackAttributeName, $haystackClassOrObject, $message='')
 
static assertGreaterThan ($expected, $actual, $message='')
 
static assertAttributeGreaterThan ($expected, $actualAttributeName, $actualClassOrObject, $message='')
 
static assertGreaterThanOrEqual ($expected, $actual, $message='')
 
static assertAttributeGreaterThanOrEqual ($expected, $actualAttributeName, $actualClassOrObject, $message='')
 
static assertLessThan ($expected, $actual, $message='')
 
static assertAttributeLessThan ($expected, $actualAttributeName, $actualClassOrObject, $message='')
 
static assertLessThanOrEqual ($expected, $actual, $message='')
 
static assertAttributeLessThanOrEqual ($expected, $actualAttributeName, $actualClassOrObject, $message='')
 
static assertFileEquals ($expected, $actual, $message='', $canonicalize=false, $ignoreCase=false)
 
static assertFileNotEquals ($expected, $actual, $message='', $canonicalize=false, $ignoreCase=false)
 
static assertStringEqualsFile ($expectedFile, $actualString, $message='', $canonicalize=false, $ignoreCase=false)
 
static assertStringNotEqualsFile ($expectedFile, $actualString, $message='', $canonicalize=false, $ignoreCase=false)
 
static assertIsReadable ($filename, $message='')
 
static assertNotIsReadable ($filename, $message='')
 
static assertIsWritable ($filename, $message='')
 
static assertNotIsWritable ($filename, $message='')
 
static assertDirectoryExists ($directory, $message='')
 
static assertDirectoryNotExists ($directory, $message='')
 
static assertDirectoryIsReadable ($directory, $message='')
 
static assertDirectoryNotIsReadable ($directory, $message='')
 
static assertDirectoryIsWritable ($directory, $message='')
 
static assertDirectoryNotIsWritable ($directory, $message='')
 
static assertFileExists ($filename, $message='')
 
static assertFileNotExists ($filename, $message='')
 
static assertFileIsReadable ($file, $message='')
 
static assertFileNotIsReadable ($file, $message='')
 
static assertFileIsWritable ($file, $message='')
 
static assertFileNotIsWritable ($file, $message='')
 
static assertTrue ($condition, $message='')
 
static assertNotTrue ($condition, $message='')
 
static assertFalse ($condition, $message='')
 
static assertNotFalse ($condition, $message='')
 
static assertNull ($actual, $message='')
 
static assertNotNull ($actual, $message='')
 
static assertFinite ($actual, $message='')
 
static assertInfinite ($actual, $message='')
 
static assertNan ($actual, $message='')
 
static assertClassHasAttribute ($attributeName, $className, $message='')
 
static assertClassNotHasAttribute ($attributeName, $className, $message='')
 
static assertClassHasStaticAttribute ($attributeName, $className, $message='')
 
static assertClassNotHasStaticAttribute ($attributeName, $className, $message='')
 
static assertObjectHasAttribute ($attributeName, $object, $message='')
 
static assertObjectNotHasAttribute ($attributeName, $object, $message='')
 
static assertSame ($expected, $actual, $message='')
 
static assertAttributeSame ($expected, $actualAttributeName, $actualClassOrObject, $message='')
 
static assertNotSame ($expected, $actual, $message='')
 
static assertAttributeNotSame ($expected, $actualAttributeName, $actualClassOrObject, $message='')
 
static assertInstanceOf ($expected, $actual, $message='')
 
static assertAttributeInstanceOf ($expected, $attributeName, $classOrObject, $message='')
 
static assertNotInstanceOf ($expected, $actual, $message='')
 
static assertAttributeNotInstanceOf ($expected, $attributeName, $classOrObject, $message='')
 
static assertInternalType ($expected, $actual, $message='')
 
static assertAttributeInternalType ($expected, $attributeName, $classOrObject, $message='')
 
static assertNotInternalType ($expected, $actual, $message='')
 
static assertAttributeNotInternalType ($expected, $attributeName, $classOrObject, $message='')
 
static assertRegExp ($pattern, $string, $message='')
 
static assertNotRegExp ($pattern, $string, $message='')
 
static assertSameSize ($expected, $actual, $message='')
 
static assertNotSameSize ($expected, $actual, $message='')
 
static assertStringMatchesFormat ($format, $string, $message='')
 
static assertStringNotMatchesFormat ($format, $string, $message='')
 
static assertStringMatchesFormatFile ($formatFile, $string, $message='')
 
static assertStringNotMatchesFormatFile ($formatFile, $string, $message='')
 
static assertStringStartsWith ($prefix, $string, $message='')
 
static assertStringStartsNotWith ($prefix, $string, $message='')
 
static assertStringEndsWith ($suffix, $string, $message='')
 
static assertStringEndsNotWith ($suffix, $string, $message='')
 
static assertXmlFileEqualsXmlFile ($expectedFile, $actualFile, $message='')
 
static assertXmlFileNotEqualsXmlFile ($expectedFile, $actualFile, $message='')
 
static assertXmlStringEqualsXmlFile ($expectedFile, $actualXml, $message='')
 
static assertXmlStringNotEqualsXmlFile ($expectedFile, $actualXml, $message='')
 
static assertXmlStringEqualsXmlString ($expectedXml, $actualXml, $message='')
 
static assertXmlStringNotEqualsXmlString ($expectedXml, $actualXml, $message='')
 
static assertEqualXMLStructure (DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes=false, $message='')
 
static assertThat ($value, Constraint $constraint, $message='')
 
static assertJson ($actualJson, $message='')
 
static assertJsonStringEqualsJsonString ($expectedJson, $actualJson, $message='')
 
static assertJsonStringNotEqualsJsonString ($expectedJson, $actualJson, $message='')
 
static assertJsonStringEqualsJsonFile ($expectedFile, $actualJson, $message='')
 
static assertJsonStringNotEqualsJsonFile ($expectedFile, $actualJson, $message='')
 
static assertJsonFileEqualsJsonFile ($expectedFile, $actualFile, $message='')
 
static assertJsonFileNotEqualsJsonFile ($expectedFile, $actualFile, $message='')
 
static logicalAnd ()
 
static logicalOr ()
 
static logicalNot (Constraint $constraint)
 
static logicalXor ()
 
static anything ()
 
static isTrue ()
 
static callback ($callback)
 
static isFalse ()
 
static isJson ()
 
static isNull ()
 
static isFinite ()
 
static isInfinite ()
 
static isNan ()
 
static attribute (Constraint $constraint, $attributeName)
 
static contains ($value, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static containsOnly ($type)
 
static containsOnlyInstancesOf ($classname)
 
static arrayHasKey ($key)
 
static equalTo ($value, $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static attributeEqualTo ($attributeName, $value, $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static isEmpty ()
 
static isWritable ()
 
static isReadable ()
 
static directoryExists ()
 
static fileExists ()
 
static greaterThan ($value)
 
static greaterThanOrEqual ($value)
 
static classHasAttribute ($attributeName)
 
static classHasStaticAttribute ($attributeName)
 
static objectHasAttribute ($attributeName)
 
static identicalTo ($value)
 
static isInstanceOf ($className)
 
static isType ($type)
 
static lessThan ($value)
 
static lessThanOrEqual ($value)
 
static matchesRegularExpression ($pattern)
 
static matches ($string)
 
static stringStartsWith ($prefix)
 
static stringContains ($string, $case=true)
 
static stringEndsWith ($suffix)
 
static countOf ($count)
 
static fail ($message='')
 
static readAttribute ($classOrObject, $attributeName)
 
static getStaticAttribute ($className, $attributeName)
 
static getObjectAttribute ($object, $attributeName)
 
static markTestIncomplete ($message='')
 
static markTestSkipped ($message='')
 
static getCount ()
 
static resetCount ()
 
- Protected Member Functions inherited from PHPUnit\Framework\TestCase
 setExpectedExceptionFromAnnotation ()
 
 setUseErrorHandlerFromAnnotation ()
 
 checkRequirements ()
 
 runTest ()
 
 verifyMockObjects ()
 
 iniSet ($varName, $newValue)
 
 setLocale ()
 
 createMock ($originalClassName)
 
 createConfiguredMock ($originalClassName, array $configuration)
 
 createPartialMock ($originalClassName, array $methods)
 
 createTestProxy ($originalClassName, array $constructorArguments=[])
 
 getMockClass ($originalClassName, $methods=[], array $arguments=[], $mockClassName='', $callOriginalConstructor=false, $callOriginalClone=true, $callAutoload=true, $cloneArguments=false)
 
 getMockForAbstractClass ($originalClassName, array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[], $cloneArguments=false)
 
 getMockFromWsdl ($wsdlFile, $originalClassName='', $mockClassName='', array $methods=[], $callOriginalConstructor=true, array $options=[])
 
 getMockForTrait ($traitName, array $arguments=[], $mockClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=[], $cloneArguments=false)
 
 getObjectForTrait ($traitName, array $arguments=[], $traitClassName='', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true)
 
 prophesize ($classOrInterface=null)
 
 getProvidedData ()
 
 createResult ()
 
 handleDependencies ()
 
 setUp ()
 
 assertPreConditions ()
 
 assertPostConditions ()
 
 tearDown ()
 
 onNotSuccessfulTest (Throwable $t)
 
 prepareTemplate (Text_Template $template)
 
- Protected Attributes inherited from PHPUnit\Framework\TestCase
 $backupGlobals
 
 $backupGlobalsBlacklist = []
 
 $backupStaticAttributes
 
 $backupStaticAttributesBlacklist = []
 
 $runTestInSeparateProcess
 
 $preserveGlobalState = true
 

Member Function Documentation

◆ testEight()

ExceptionTest::testEight ( )

@expectedException Class @expectedExceptionMessage Message @expectedExceptionCode 0

◆ testFive()

ExceptionTest::testFive ( )

@expectedException Class Message 1234

◆ testFour()

ExceptionTest::testFour ( )

@expectedException ほげ

◆ testNine()

ExceptionTest::testNine ( )

@expectedException Class @expectedExceptionMessage ExceptionTest::ERROR_MESSAGE @expectedExceptionCode ExceptionTest::ERROR_CODE

◆ testOne()

ExceptionTest::testOne ( )

@expectedException FooBarBaz

◆ testSeven()

ExceptionTest::testSeven ( )

@expectedException Class @expectedExceptionMessage Message @expectedExceptionCode ExceptionCode

◆ testSingleLine()

ExceptionTest::testSingleLine ( )

@expectedException Class

◆ testSix()

ExceptionTest::testSix ( )

@expectedException Class @expectedExceptionMessage Message @expectedExceptionCode 1234

◆ testThree()

ExceptionTest::testThree ( )

@expectedException Foo\Bar\Baz

◆ testTwo()

ExceptionTest::testTwo ( )

@expectedException Foo_Bar_Baz

◆ testUnknownConstants()

ExceptionTest::testUnknownConstants ( )

@expectedException Class @expectedExceptionCode ExceptionTest::UNKNOWN_CODE_CONSTANT @expectedExceptionMessage ExceptionTest::UNKNOWN_MESSAGE_CONSTANT

◆ testWithRegexMessage()

ExceptionTest::testWithRegexMessage ( )

@expectedException Class @expectedExceptionCode 1234 @expectedExceptionMessage Message @expectedExceptionMessageRegExp #regex#

◆ testWithRegexMessageFromClassConstant()

ExceptionTest::testWithRegexMessageFromClassConstant ( )

@expectedException Class @expectedExceptionCode 1234 @expectedExceptionMessage Message @expectedExceptionMessageRegExp ExceptionTest::ERROR_MESSAGE_REGEX

◆ testWithUnknowRegexMessageFromClassConstant()

ExceptionTest::testWithUnknowRegexMessageFromClassConstant ( )

@expectedException Class @expectedExceptionCode 1234 @expectedExceptionMessage Message @expectedExceptionMessageRegExp ExceptionTest::UNKNOWN_MESSAGE_REGEX_CONSTANT


The documentation for this class was generated from the following file: