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