PHP Class Go\Instrument\Transformer\WeavingTransformerTest

Inheritance: extends PHPUnit_Framework_TestCase
Datei anzeigen Open project: goaop/framework

Protected Properties

Property Type Description
$adviceMatcher null | Go\Core\AdviceMatcher
$kernel null | Go\Core\AspectKernel | PHPUnit_Framework_MockObject_MockObject
$transformer WeavingTransformer

Public Methods

Method Description
setUp ( ) {@inheritDoc}
testAspectIsSkipped ( ) Do not make anything for aspect class
testEmptyNamespaceInFile ( ) Do not make anything for code without classes
testInterfaceIsSkipped ( ) Do not make anything for interface class
testMultipleClasses ( ) Testcase for multiple classes (@see https://github.com/lisachenko/go-aop-php/issues/71)
testMultipleNamespacesInOneFile ( ) It's a caution check that multiple namespaces are not yet supported
testTransformerWithIncludePaths ( ) Transformer verifies include paths
testWeaverForFinalClass ( ) Check that weaver can work with final class
testWeaverForNormalClass ( ) Main test case for class
testWeaverForPhp7Class ( ) Check that weaver can work with PHP7 classes

Protected Methods

Method Description
getAdviceMatcherMock ( ) : PHPUnit_Framework_MockObject_MockObject | AdviceMatcher Returns a mock for container
getKernelMock ( array $options, Go\Core\AspectContainer $container ) : PHPUnit_Framework_MockObject_MockObject | AspectKernel Returns a mock for kernel
normalizeWhitespaces ( string $value ) : string Normalizes string context

Private Methods

Method Description
getContainerMock ( ) : Go\Core\AspectContainer Returns a mock for the container
loadTest ( string $name ) : StreamMetaData

Method Details

getAdviceMatcherMock() protected method

Returns a mock for container
protected getAdviceMatcherMock ( ) : PHPUnit_Framework_MockObject_MockObject | AdviceMatcher
return PHPUnit_Framework_MockObject_MockObject | Go\Core\AdviceMatcher

getKernelMock() protected method

Returns a mock for kernel
protected getKernelMock ( array $options, Go\Core\AspectContainer $container ) : PHPUnit_Framework_MockObject_MockObject | AspectKernel
$options array Additional options for kernel
$container Go\Core\AspectContainer Container instance
return PHPUnit_Framework_MockObject_MockObject | Go\Core\AspectKernel

normalizeWhitespaces() protected method

Normalizes string context
protected normalizeWhitespaces ( string $value ) : string
$value string
return string

setUp() public method

{@inheritDoc}
public setUp ( )

testAspectIsSkipped() public method

Do not make anything for aspect class
public testAspectIsSkipped ( )

testEmptyNamespaceInFile() public method

Do not make anything for code without classes

testInterfaceIsSkipped() public method

Do not make anything for interface class

testMultipleClasses() public method

Testcase for multiple classes (@see https://github.com/lisachenko/go-aop-php/issues/71)
public testMultipleClasses ( )

testMultipleNamespacesInOneFile() public method

It's a caution check that multiple namespaces are not yet supported

testTransformerWithIncludePaths() public method

Transformer verifies include paths

testWeaverForFinalClass() public method

Check that weaver can work with final class

testWeaverForNormalClass() public method

Main test case for class

testWeaverForPhp7Class() public method

Check that weaver can work with PHP7 classes

Property Details

$adviceMatcher protected_oe property

protected null|AdviceMatcher,Go\Core $adviceMatcher
return null | Go\Core\AdviceMatcher

$kernel protected_oe property

protected null|AspectKernel,Go\Core|PHPUnit_Framework_MockObject_MockObject $kernel
return null | Go\Core\AspectKernel | PHPUnit_Framework_MockObject_MockObject

$transformer protected_oe property

protected WeavingTransformer,Go\Instrument\Transformer $transformer
return WeavingTransformer