You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: morphTest.m
    path of file: ./repos/machinevision-toolbox-matlab/unit_test
    
    the code of the file until where you have to start completion: function tests = MorphTest(testCase)
    tests = functiontests(localfunctions);
end

function imorph1_test(testCase)
    in = [1 2; 3 4];
    se = 1;
    verifyEqual(testCase,
    
function imorph1_test(testCase)
    in = [1 2; 3 4];
    se = 1;
    verifyEqual(testCase,  imorph(in, se, 'min'), in);
    verifyEqual(testCase,  imorph(in, se, 'max'), in);
    verifyEqual(testCase,  imorph(in, se, 'min', 'replicate'), in);
    verifyEqual(testCase,  imorph(in, se, 'min', 'valid'), in);
    verifyEqual(testCase,  imorph(in, se, 'min', 'valid'), in);
    
    % test different input formats
    verifyEqual(testCase,  imorph(cast(in, 'uint8'), se, 'min'), in);
    verifyEqual(testCase,  imorph(cast(in, 'uint16'), se, 'min'), in);    
    verifyEqual(testCase,  imorph(cast(in, 'single'), se, 'min'), in);
    in2 = [1 0 1; 0 1 0; 1 1 0];
    verifyEqual(testCase,  imorph(logical(in2), se, 'min'), in2);    

    % test a SE that falls over the boundary  
    se = [0 0 0; 0 1 0; 0 0 0];
    verifyEqual(testCase,  imorph(in, se, 'min', 'replicate'), in);
    
    in = [
        1 2 3
        4 5 6
        7 8 9
        ];
    verifyEqual(testCase,  imorph(in, se, 'min', 'valid'), in(2,2));

    % border none trim wrap
end

function imorph2_test(testCase)
    % test wrap case
    in = [
        1 2 3
        4 5 6
        7 8 9
        ];
    verifyEqual(testCase,  imorph(in, [0 0 1], 'min', 'wrap'),  circshift(in, [ 0 -1]));
    verifyEqual(testCase,  imorph(in, [1 0 0], 'min', 'wrap'),  circshift(in, [ 0  1]));
    verifyEqual(testCase,  imorph(in, [0 0 1]', 'min', 'wrap'), circshift(in, [-1  0]));
    verifyEqual(testCase,  imorph(in, [1 0 0]', 'min', 'wrap'), circshift(in, [ 1  0]));

end

function imorph3_test(testCase)
    % test simple erosion (double)
    in = [
        1 2 3
        4 5 6
        7 8 9
        ];

    verifyEqual(testCase, imorph(in, ones(3,3), 'max', 'valid'), 9);

    out = [
        9 9 9
        9 9 9
        9 9 9
        ];
    verifyEqual(testCase, imorph(in, ones(3,3), 'max', 'wrap'), out);

    out = [
        1 1 1
        1 1 1
        1 1 1
        ];
    verifyEqual(testCase, imorph(in, ones(3,3), 'min', 'wrap'), out);

    out = [
        1 1 2
        1 1 2
        4 4 5
        ];
    verifyEqual(testCase, imorph(in, ones(3,3), 'min', 'replicate'), out);

    out = [
        5 6 6
        8 9 9
        8 9 9
        ];
    verifyEqual(testCase, imorph(in, ones(3,3), 'max', 'none'), out);


    % test simple erosion (int)
    in = cast([
        1 1 0
        1 1 0
        0 0 0
        ], 'uint8');

    out = [
        1 0 0
        0 0 0
        0 0 0
        ];

    verifyEqual(testCase, imorph(in, ones(3,3), 'min'), out);
end