Go\Aop\Pointcut\SignaturePointcutTest::testWontMatchModifier PHP Method

testWontMatchModifier() public method

Tests that pointcut won't match if modifier filter is not match
    public function testWontMatchModifier()
    {
        $trueInstance = TruePointFilter::getInstance();
        $notInstance = new NotPointFilter($trueInstance);
        $filterKind = PointFilter::KIND_METHOD;
        $pointcut = new SignaturePointcut($filterKind, 'publicMethod', $notInstance);
        $matched = $pointcut->matches(new \ReflectionMethod(self::STUB_CLASS, 'publicMethod'));
        $this->assertFalse($matched, "Pointcut should not match modifier");
    }