Beispiel #1
0
            expect($gather)->to_be('request');
            reset_request();
            // get
            mimick_request('/', 'DELETE');
            $gather = gather_info(function () {
                t::request('/', function () {
                    echo 'request';
                });
                t::delete('/', function () {
                    echo 'delete';
                });
                t::not_found(function () {
                    echo 'no rules picked up';
                });
            });
            expect($gather)->to_be('request');
        });
        it("should ignore request() for unknown methods, e.g. not GET, POST.", function () {
            mimick_request('/', 'TRUNCATE');
            $gather = gather_info(function () {
                t::request('/', function () {
                    echo 'request';
                });
                t::not_found(function () {
                    echo 'no rules picked up';
                });
            });
            expect($gather)->to_be('no rules picked up');
        });
    });
});