Phalcon\Test\Unit\Annotations\ReflectionTest::testParsingARealClass PHP Method

testParsingARealClass() public method

Tests parsing a real class
Since: 2016-01-26
Author: Serghei Iakovlev ([email protected])
    public function testParsingARealClass()
    {
        $this->specify('Parsing a real class does not return correct result', function () {
            $reader = new Reader();
            $reflection = new Reflection($reader->parse('TestClass'));
            $classAnnotations = $reflection->getClassAnnotations();
            expect(get_class($classAnnotations))->equals('Phalcon\\Annotations\\Collection');
            $number = 0;
            foreach ($classAnnotations as $annotation) {
                expect(get_class($annotation))->equals('Phalcon\\Annotations\\Annotation');
                $number++;
            }
            expect($number)->equals(9);
            expect($classAnnotations)->count(9);
        });
    }