<?php

set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/src');

spl_autoload_register(function ($className) {
    if (strpos($className, 'Ockcyp') !== 0) {
        return;
    }

    $fileName  = '';
    $namespace = '';
    if ($lastNsPos = strrpos($className, '\\')) {
        $namespace = substr($className, 0, $lastNsPos);
        $className = substr($className, $lastNsPos + 1);
        $fileName  = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
    }
    $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';

    include $fileName;
});

<?php

spl_autoload_register(function ($className) {
    $srcDir = 'src';
    $fileName  = __DIR__ . DIRECTORY_SEPARATOR . $srcDir . DIRECTORY_SEPARATOR;
    if ($lastNsPos = strrpos($className, '\\')) {
        $namespace = substr($className, 0, $lastNsPos);
        $className = substr($className, $lastNsPos + 1);
        $fileName .= str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
    }
    $fileName .= $className . '.php';

    require $fileName;
});

--- 
+++ 
@@ -1,14 +1,20 @@
 <?php
 
+set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/src');
+
 spl_autoload_register(function ($className) {
-    $srcDir = 'src';
-    $fileName  = __DIR__ . DIRECTORY_SEPARATOR . $srcDir . DIRECTORY_SEPARATOR;
+    if (strpos($className, 'Ockcyp') !== 0) {
+        return;
+    }
+
+    $fileName  = '';
+    $namespace = '';
     if ($lastNsPos = strrpos($className, '\\')) {
         $namespace = substr($className, 0, $lastNsPos);
         $className = substr($className, $lastNsPos + 1);
-        $fileName .= str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
+        $fileName  = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
     }
-    $fileName .= $className . '.php';
+    $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
 
-    require $fileName;
+    include $fileName;
 });
Fix test coverage report failing because of autoload
