FlitchTest\Rule\Naming\MethodsTest::testNoViolationOnMagicMethods PHP Méthode

testNoViolationOnMagicMethods() public méthode

    public function testNoViolationOnMagicMethods()
    {
        $tokenizer = new Tokenizer();
        $file = $tokenizer->tokenize('foo.php', "<?php class foo { function __construct() {} }");
        $file->rewind();
        $file->seekTokenType(T_FUNCTION);
        $rule = new Methods();
        $rule->setFormat('bar');
        $rule->visitToken($file);
        $this->assertRuleViolations($file, array());
    }