it('throws exception if the length of an array is 0', function () { shouldThrowException(function () { $expect = new Expectation(array()); $expect->notToBeEmpty(); }); }); it('returns if the length of a string is not 0', function () { shouldReturn(function () { $expect = new Expectation('0'); $expect->notToBeEmpty(); }); }); it('throws exception if the length of a string is 0', function () { shouldThrowException(function () { $expect = new Expectation(''); $expect->notToBeEmpty(); }); }); }); context('toContain', function () { context('with a single argument', function () { it('returns if the array contains the value', function () { shouldReturn(function () { $expect = new Expectation(array('test', 'spec')); $expect->toContain('spec'); }); }); it('throws exception if the value is not included', function () { shouldThrowException(function () { $expect = new Expectation(array('test', 'spec')); $expect->toContain('bdd');