/** * @dataProvider provideFilesToCheck */ public function testReferences($file) { $this->assertTrue(file_exists($file), "Expected {$file} to exist."); foreach ((new ReferenceAnalyzer())->analyze($file) as $class) { $this->assertTrue(ClassInspector::inspect($class)->exists(), "Expected {$class} to exist."); } }
/** * @dataProvider provideFilesToCheck */ public function testExistence($class, $test) { $inspector = ClassInspector::inspect($class); $this->assertTrue($inspector->exists(), "Expected {$class} to exist."); if ($inspector->isClass()) { $this->assertTrue(class_exists($test), "Expected there to be tests for {$class}."); } }