Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 3
StatsTest
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
 setUp()
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 3
<?php
use stats\StatsDAO;
class StatsTest extends \PHPUnit_Framework_TestCase
{
 protected $db;
     public function setUp()
    {
    $dsn = "mmysql:localhost;dbname=baseball;user=root,password=root";
    $this->db = new PDO($dsn);
    }
   
    /*
    public function testGetSqlById()
    {
    $stat = new StatsDAO($this->db);
    $expected = array('Albert','1994','123','122','121','12','12','123','31909090.00','test');
    $testStat = $stat->getSqlById(1);
    $this->assertEquals($expected,$testStat,"Failed to deliver stats when passed an id");
    }*/
 
 
 /*
    //with a partial mock
     public function testMockStats()
    {
        $stat= $this->getMock('Stats', array('getById'));
        $stat->expects($this->any())
            ->method('getById')
            ->will($this->returnValue(false));
        $stat->getById('1'); // returns result array
        $this->assertEquals($result, $phpMock->multiply($value,$multiplier));
    }
    //with a partial mockery
     public function testMockStats()
    {
    $mockeryMock = \Mockery::mock(new Stats);
    $mockeryMock->shouldReceive('getById')->andReturn($result);
    $this->assertEquals($result, $mockeryMock->getById(1));
      }
      */
}