/**
  * @test
  */
 public function withinPointcutsAlsoAcceptClassNames()
 {
     $targetClass = new Fixtures\TargetClass01();
     $this->assertSame('Flow is Rocket Science', $targetClass->sayWhatFlowIs(), 'TargetClass01');
     $childClass = new Fixtures\ChildClassOfTargetClass01();
     $this->assertSame('Flow is not Rocket Science', $childClass->sayWhatFlowIs(), 'Child class of TargetClass01');
 }
 /**
  * @test
  */
 public function canCallAdvicedParentMethodNotDeclaredInChild()
 {
     $targetClass = new Fixtures\ChildClassOfTargetClass01();
     $greeting = $targetClass->greet('Flow');
     $this->assertEquals('Hello, me', $greeting);
 }
Example #3
0
 /**
  * @test
  */
 public function anAdvicedParentMethodIsCalledCorrectlyIfANonAdvicedOverridingMethodCallsIt()
 {
     $targetClass = new Fixtures\ChildClassOfTargetClass01();
     $this->assertEquals('Two plus two makes five! For big twos and small fives! That was smart, eh?', $targetClass->saySomethingSmart());
 }