예제 #1
0
             $expect = new Expectation('test123');
             $expect->toEndWith('test');
         });
     });
 });
 context('notToEndWith', function () {
     it('returns if the string does not contain the suffix', function () {
         shouldReturn(function () {
             $expect = new Expectation('test123');
             $expect->notToEndWith('test');
         });
     });
     it('throws exception if it contains the suffix', function () {
         shouldThrowException(function () {
             $expect = new Expectation('test123');
             $expect->notToEndWith('123');
         });
     });
 });
 context('toBeGreaterThan', function () {
     it('returns if the value is greater than the min', function () {
         shouldReturn(function () {
             $expect = new Expectation(2);
             $expect->toBeGreaterThan(1);
         });
     });
     it('throws exception if it is not greater than the min', function () {
         shouldThrowException(function () {
             $expect = new Expectation(1);
             $expect->toBeGreaterThan(2);
         });