Esempio n. 1
0
             $expect = new Expectation($closure);
             $expect->toBeAnInstanceOf('stdClass');
         });
     });
 });
 context('notToBeAnInstanceOf', function () {
     it('returns if the object if not of the expected class', function () {
         shouldReturn(function () {
             $expect = new Expectation(new \stdClass());
             $expect->notToBeAnInstanceOf('Closure');
         });
     });
     it('throws exception if it has the expected class', function () {
         shouldThrowException(function () {
             $expect = new Expectation(new \stdClass());
             $expect->notToBeAnInstanceOf('stdClass');
         });
     });
 });
 context('toBe', function () {
     it('returns if the value is strictly equal', function () {
         shouldReturn(function () {
             $expect = new Expectation(array());
             $expect->toBe(array());
         });
     });
     it('throws exception if not strictly equal', function () {
         shouldThrowException(function () {
             $expect = new Expectation(array());
             $expect->toBe('');
         });