コード例 #1
0
ファイル: ExpectationSpec.php プロジェクト: ciarand/pho
     it('throws exception if any of the values are included', function () {
         shouldThrowException(function () {
             $expect = new Expectation(array('test', 'spec'));
             $expect->notToContainAnyOf('tdd', 'test');
         });
     });
     it('returns if the string does not contain any of the substrings', function () {
         shouldReturn(function () {
             $expect = new Expectation('testing');
             $expect->notToContainAnyOf('bdd', 'spec');
         });
     });
     it('throws exception if any of the substrings are found', function () {
         shouldThrowException(function () {
             $expect = new Expectation('testing');
             $expect->notToContainAnyOf('TEST', 'ing');
         });
     });
 });
 context('toPrint', function () {
     it('returns if callable printed the value', function () {
         shouldReturn(function () {
             $expect = new Expectation(function () {
                 echo 'test';
             });
             $expect->toPrint('test');
         });
     });
     it('throws exception if callable does not print the value', function () {
         shouldThrowException(function () {
             $expect = new Expectation(function () {