Skip to content

Instantly share code, notes, and snippets.

@peterfox
Last active January 5, 2020 13:59

Revisions

  1. peterfox revised this gist Jan 5, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions DataProviderExample.php
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    <?php

    /**
    * @dataprovider sums
    */
  2. peterfox created this gist Jan 5, 2020.
    15 changes: 15 additions & 0 deletions DataProviderExample.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    /**
    * @dataprovider sums
    */
    public function testSums($first, $second, $expected)
    {
    $this->assertSame($expected, $first + $second);
    }

    public function sums()
    {
    return [
    [1, 1, 2],
    [2, 1, 3],
    ];
    }