|
@@ 35-45 (lines=11) @@
|
| 32 |
|
$this->broker = new Broker($this->backend); |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
public function testGetClasses(): void |
| 36 |
|
{ |
| 37 |
|
$this->broker->processDirectory(__DIR__ . '/BackendSource'); |
| 38 |
|
$classes = $this->backend->getClasses(); |
| 39 |
|
$this->assertCount(1, $classes); |
| 40 |
|
|
| 41 |
|
$class = array_pop($classes); |
| 42 |
|
$this->assertInstanceOf(ClassReflectionInterface::class, $class); |
| 43 |
|
|
| 44 |
|
$this->checkLoadedProperties($class); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
public function testGetFunctions(): void |
| 48 |
|
{ |
|
@@ 47-57 (lines=11) @@
|
| 44 |
|
$this->checkLoadedProperties($class); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
public function testGetFunctions(): void |
| 48 |
|
{ |
| 49 |
|
$this->broker->processDirectory(__DIR__ . '/BackendSource'); |
| 50 |
|
$functions = $this->backend->getFunctions(); |
| 51 |
|
$this->assertCount(1, $functions); |
| 52 |
|
|
| 53 |
|
$function = array_pop($functions); |
| 54 |
|
$this->assertInstanceOf(FunctionReflectionInterface::class, $function); |
| 55 |
|
|
| 56 |
|
$this->checkLoadedProperties($function); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
public function testGetConstants(): void |
| 60 |
|
{ |
|
@@ 59-69 (lines=11) @@
|
| 56 |
|
$this->checkLoadedProperties($function); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
public function testGetConstants(): void |
| 60 |
|
{ |
| 61 |
|
$this->broker->processDirectory(__DIR__ . '/BackendSource'); |
| 62 |
|
$constants = $this->backend->getConstants(); |
| 63 |
|
$this->assertCount(1, $constants); |
| 64 |
|
|
| 65 |
|
$constant = array_pop($constants); |
| 66 |
|
$this->assertInstanceOf('ApiGen\Parser\Reflection\ReflectionConstant', $constant); |
| 67 |
|
|
| 68 |
|
$this->checkLoadedProperties($constant); |
| 69 |
|
} |
| 70 |
|
|
| 71 |
|
/** |
| 72 |
|
* @param object $object |