Exemple #1
0
             $expect = new Expectation('');
             $expect->toBeNull();
         });
     });
 });
 context('notToBeNull', function () {
     it('returns if the value is not null', function () {
         shouldReturn(function () {
             $expect = new Expectation('');
             $expect->notToBeNull();
         });
     });
     it('throws exception if null', function () {
         shouldThrowException(function () {
             $expect = new Expectation(null);
             $expect->notToBeNull();
         });
     });
 });
 context('toBeTrue', function () {
     it('returns if the value is true', function () {
         shouldReturn(function () {
             $expect = new Expectation(true);
             $expect->toBeTrue();
         });
     });
     it('throws exception if not true', function () {
         shouldThrowException(function () {
             $expect = new Expectation(1);
             $expect->toBeTrue();
         });