it('throws exception if not all values are included', function () { shouldThrowException(function () { $expect = new Expectation(array('test', 'spec')); $expect->toContain('test', 'bdd'); }); }); it('returns if the string contains the substring', function () { shouldReturn(function () { $expect = new Expectation('testing'); $expect->toContain('test', 'ing'); }); }); it('throws exception if not all substrings are included', function () { shouldThrowException(function () { $expect = new Expectation('testing'); $expect->toContain('test', 'ing', 'TEST'); }); }); }); }); context('notToContain', function () { context('with a single argument', function () { it('returns if the array does not contain the value', function () { shouldReturn(function () { $expect = new Expectation(array('test', 'spec')); $expect->notToContain('bdd'); }); }); it('throws exception if the array contains the value', function () { shouldThrowException(function () { $expect = new Expectation(array('test', 'spec'));