Skip to content

[Test] Improve base support for functional testing #340

Description

@TheCelavi

Class https://github.com/goaop/framework/blob/2.x/tests/Go/Functional/BaseFunctionalTest.php should be based class for all functional test, which would improve our testing capability for coverage of various edge cases by simply reproducing other people setup.

In order to have this kind of support, BaseFunctionalTest class and front controller should be modified in order to allow us:

  • to define which configuration should be used for AspectKernel for each functional test. That will allow us to test various configuration possibilities, especially useful for those where exception should be thrown and exception message is important. DONE, see Feature/detecting inconsistent weaving #346
  • to define which aspects should be registered in AspectKernel for each functional test. That will speed up testing process, as well as provide us with some isolation. DONE, see Feature/detecting inconsistent weaving #346
  • to implement custom assertWeaved* methods which would setup base possibility to check weaving of generated, cached classes (of course, without loading, using AST). Partially done
    • assertClassIsWoven($class) DONE Feature/detecting inconsistent weaving #346
    • assertClassIsNotWoven($class) DONE Feature/detecting inconsistent weaving #346
    • assertClassHasStaticMethodJoinPoint($class, $methodName, $joinPoint, $index = null)
    • assertClassHasNotStaticMethodJoinPoint($class, $methodName, $joinPoint)
    • assertClassHasMethodJoinPoint($class, $methodName, $joinPoint, $index = null)
    • assertClassHasNotMethodJoinPoint($class, $methodName, $joinPoint)

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions