Chris@0: markTestIncomplete( Chris@0: 'API generation has slight variations when run on CI server. This test is therefore skipped on CI until we can make the test results consistent.' Chris@0: ); Chris@0: } Chris@0: Chris@0: $testDocs = tempnam(sys_get_temp_dir(), 'TestAPIDocs.md'); Chris@0: $currentDocs = getcwd() . '/docs/api.md'; Chris@0: passthru("vendor/bin/phpdoc-md generate src > $testDocs"); Chris@0: Chris@0: $testDocsContent = file_get_contents($testDocs); Chris@0: $currentDocsContent = file_get_contents($currentDocs); Chris@0: Chris@0: $testDocsContent = str_replace (array("\r\n", "\r"), "\n", $testDocsContent); Chris@0: $currentDocsContent = str_replace (array("\r\n", "\r"), "\n", $currentDocsContent); Chris@0: Chris@0: $this->assertEquals($testDocsContent, $currentDocsContent, "API docuementation out of date. Run 'composer api' to update."); Chris@0: } Chris@0: }