Importing test cases for Detector from PHP counterpart