fail($class.' not found in '.$parent."::\$_nested. Found:\n ".implode("\n ", array_keys($parent::$_nested))); } } } /** * @dataProvider allAnnotationClasses * * @param string $class */ public function testNested($class) { foreach (array_keys($class::$_nested) as $nestedClass) { $found = false; foreach ($nestedClass::$_parents as $parent) { if ($parent === $class) { $found = true; break; } } if ($found === false) { $this->fail($class.' not found in '.$nestedClass."::\$parent. Found:\n ".implode("\n ", $nestedClass::$_parents)); } } } }