Exemplo n.º 1
0
 });
 context('notToPrint', function () {
     it('throws exception if callable printed the value', function () {
         shouldThrowException(function () {
             $expect = new Expectation(function () {
                 echo 'test';
             });
             $expect->notToPrint('test');
         });
     });
     it('returns if callable does not print the value', function () {
         shouldReturn(function () {
             $expect = new Expectation(function () {
                 echo 'testing';
             });
             $expect->notToPrint('test');
         });
     });
 });
 context('toThrow', function () {
     it('returns if callable threw the exception', function () {
         shouldReturn(function () {
             $expect = new Expectation(function () {
                 throw new \Exception('test');
             });
             $expect->toThrow('\\Exception');
         });
     });
     it('throws exception if callable throws a different exception', function () {
         shouldThrowException(function () {
             $expect = new Expectation(function () {