Continued:
[core.git] / framework / main / tests / filter / tests / configuration / classes / class_TestConfigurationLoadableClassesFilter.php
index b6f49a7..cf2ff99 100644 (file)
@@ -66,6 +66,10 @@ class TestConfigurationLoadableClassesFilter extends BaseTestsFilter implements
         * @todo        0% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Init counter
+               $passed = 0;
+               $failed = 0;
+
                // Loop through all configuration keys
                foreach ($this->getConfigInstance()->getConfigurationArray() as $configKey => $configValue) {
                        // Key must end with _class
@@ -85,6 +89,7 @@ class TestConfigurationLoadableClassesFilter extends BaseTestsFilter implements
                                        self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Class "%s" not found. FAILED', $configValue));
 
                                        // Skip further tests
+                                       $failed++;
                                        continue;
                                } // END - if
                        } catch (InvalidArgumentException $e) {
@@ -92,13 +97,18 @@ class TestConfigurationLoadableClassesFilter extends BaseTestsFilter implements
                                self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Class "%s" failed to load. Message: "%s"', $configValue, $e->getMessage()));
 
                                // Skip further tests
+                               $failed++;
                                continue;
                        }
 
                        // class_exists() didn't fail
                        self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Class "%s" loaded successfully. OKAY', $configValue));
+                       $passed++;
                } // END - foreach
 
+               // Output result
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('Test result: %d okay, %d failed (%0.02f%% passed)', $passed, $failed, ($passed / ($passed + $failed))));
+
                // Implement this!
                $this->partialStub('Please implement this method.');
        }