예제 #1
0
 function passingTest(Assert $assert)
 {
     $this->suite->test('one', function (Assert $assert) {
         $assert->pass();
     });
     $this->runAndAssertOutput($assert, ['Foo', 'Foo::one -> Passed', '', '=D 1 Passed']);
 }
예제 #2
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']);
 }
예제 #3
0
 function mixedResults(Assert $assert)
 {
     $this->suite->test('one', function (Assert $assert) {
         $assert->pass();
     });
     $this->suite->test('two', function (Assert $assert) {
         $assert->fail();
     });
     $this->suite->test('three', function (Assert $assert) {
         $assert->incomplete();
     });
     $this->runTestSuite();
     $assert(end($this->outputLines), '3 ran, 1 FAILED =(');
 }
예제 #4
0
 public function foo(Assert $asserter)
 {
     $asserter->pass();
 }