~tcuthbert/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to vendor/phpunit/phpunit/tests/_files/DataProviderTest.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
class DataProviderTest extends PHPUnit_Framework_TestCase
 
3
{
 
4
    /**
 
5
     * @dataProvider providerMethod
 
6
     */
 
7
    public function testAdd($a, $b, $c)
 
8
    {
 
9
        $this->assertEquals($c, $a + $b);
 
10
    }
 
11
 
 
12
    public static function providerMethod()
 
13
    {
 
14
        return array(
 
15
          array(0, 0, 0),
 
16
          array(0, 1, 1),
 
17
          array(1, 1, 3),
 
18
          array(1, 0, 1)
 
19
        );
 
20
    }
 
21
}