예제 #1
0
             $expect = new Expectation('test123');
             $expect->notToStartWith('test');
         });
     });
 });
 context('toEndWith', function () {
     it('returns if the string contains the suffix', function () {
         shouldReturn(function () {
             $expect = new Expectation('test123');
             $expect->toEndWith('123');
         });
     });
     it('throws exception if it does not contain the suffix', function () {
         shouldThrowException(function () {
             $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');
         });