src/Processor/CollectiveProcessor.php
public function prepare(array $data = null)
    {
        $response = [];
        $code     = 200;
        try {
            if (!isset($data['module']) or empty($data['module'])) {
                throw new Exception\InvalidArgumentException(
                'Unable to start tests. No module has been selected.');
            }

            $selected = array_keys($data['module']);

            $tests  = app('antares.memory')->make('tests')->all();
            $active = app('antares.memory')->get("extensions.active");
            foreach ($tests as $name => $test) {

                if (in_array($test['id'], $selected)) {
                    $fullName   = isset($active[$test['component']]) ? $active[$test['component']]['full_name'] : 'Foundation';
                    $response[] = [
                        'cid'     => $test['id'],
                        'message' => "Currently testing {$name}  in {$fullName}."
                    ];
                }
            }
        } catch (\Exception $ex) {
            Log::warning($ex);
            $code       = 400;
            $response[] = [
                'error' => $ex->getMessage()
            ];
        }

        return Response::json($response, $code);
    }
public function prepare(array $data = null)
    {
        $response = [];
        $code     = 200;
        try {
            if (!isset($data['module']) or empty($data['module'])) {
                throw new Exception\InvalidArgumentException(
                'Unable to start tests. No module has been selected.');
            }

            $selected = array_keys($data['module']);

            $tests  = app('antares.memory')->make('tests')->all();
            $active = app('antares.memory')->get("extensions.active");
            foreach ($tests as $name => $test) {

                if (in_array($test['id'], $selected)) {
                    $fullName   = isset($active[$test['component']]) ? $active[$test['component']]['full_name'] : 'Foundation';
                    $response[] = [
                        'cid'     => $test['id'],
                        'message' => "Currently testing {$name}  in {$fullName}."
                    ];
                }
            }
        } catch (\Exception $ex) {
            Log::warning($ex);
            $code       = 400;
            $response[] = [
                'error' => $ex->getMessage()
            ];
        }

        return Response::json($response, $code);
    }
public function prepare ( array $ data = null ) { $ response = [ ] ; $ code = 200 ; try { if ( ! isset ( $ data [ 'module' ] ) or empty ( $ data [ 'module' ] ) ) { throw new Exception \ InvalidArgumentException ( 'Unable to start tests. No module has been selected.' ) ; } $ selected = array_keys ( $ data [ 'module' ] ) ; $ tests = app ( 'antares.memory' ) -> make ( 'tests' ) -> all ( ) ; $ active = app ( 'antares.memory' ) -> get ( "extensions.active" ) ; foreach ( $ tests as $ name => $ test ) { if ( in_array ( $ test [ 'id' ] , $ selected ) ) { $ fullName = isset ( $ active [ $ test [ 'component' ] ] ) ? $ active [ $ test [ 'component' ] ] [ 'full_name' ] : 'Foundation' ; $ response [ ] = [ 'cid' => $ test [ 'id' ] , 'message' => "Currently testing {$name}  in {$fullName}." ] ; } } } catch ( \ Exception $ ex ) { Log :: warning ( $ ex ) ; $ code = 400 ; $ response [ ] = [ 'error' => $ ex -> getMessage ( ) ] ; } return Response :: json ( $ response , $ code ) ; }
build sepcification data before real test

@param array $data
build sepcification data before real test