Esempio n. 1
0
 function detailedFailureDescription(Assert $assert)
 {
     $this->suite->test('one', function (Assert $assert) {
         $assert->fail('Oh no!');
     });
     $this->suite->test('two', function (Assert $assert) {
         $assert->fail('Not this one');
     });
     $this->runAndAssertOutput($assert, ['FAILED: Foo::one', '   Source:', '      FILE:-25', '   Code:', '      $assert->fail(\'Oh no!\');', '   Message:', '      Failed', '      Oh no!', '', 'FAILED: Foo::two', '   Source:', '      FILE:-22', '   Code:', '      $assert->fail(\'Not this one\');', '   Message:', '      Failed', '      Not this one', '', '2 ran, 2 FAILED =(']);
 }
Esempio n. 2
0
 function returnFailure(Assert $assert)
 {
     $this->test->test('bar', function (Assert $assert) {
         $assert->fail();
     });
     $this->executeCommand($assert, [], 1);
 }
Esempio n. 3
0
 function failingTest(Assert $assert)
 {
     $this->suite->test('one', function (Assert $assert) {
         $assert->fail('Oh no!');
     });
     $this->runAndAssertOutput($assert, ['Foo', 'Foo::one -> Failed', '', '---- Failed ----', 'Foo::one [FILE:-12]', '    Failed', '    Oh no!', '', '=( 1 Failed']);
 }
Esempio n. 4
0
 function mixedResults(Assert $assert)
 {
     $this->suite->test('one', function () {
     });
     $this->suite->test('two', function (Assert $assert) {
         $assert->pass();
     });
     $this->suite->test('three', function (Assert $assert) {
         $assert->fail('Miserably');
     });
     $this->suite->test('four', function (Assert $assert) {
         $assert->pass();
     });
     $this->suite->test('five', function () {
     });
     $this->runAndAssertOutput($assert, ['I.F.I', '', '---- Incomplete ----', 'Foo::one [FILE:-28]', '    No assertions made', 'Foo::five [FILE:-17]', '    No assertions made', '', '---- Failed ----', 'Foo::three [FILE:-23]', '    Failed', '    Miserably', '', '=( 2 Passed, 2 Incomplete, 1 Failed']);
 }