$expect = new Expectation(array()); $expect->notToEqual(array()); }); }); }); context('toBeNull', function () { it('returns if the value is null', function () { shouldReturn(function () { $expect = new Expectation(null); $expect->toBeNull(); }); }); it('throws exception if not null', function () { shouldThrowException(function () { $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(); });