<?php
/**
 * Created by PhpStorm.
 * User: oriol
 * Date: 30/04/16
 * Time: 13:05
 */

namespace tests;
use App\DatesFestius;

class CalendariTest extends \TestCase
{
    public function testCalendariTestCanBeCreated()
    {
        $DatesFestius = new DatesFestius();
    }
    public function testinsertDataCalendari(){
        $DatesFestius = new DatesFestius();
        $data_inici = "2016-05-01";
        $data_fi = "2016-05-02";
        $descripcio = "Pont 1 de maig";
        $DatesFestius->insertDatesFestius($data_inici, $data_fi, $descripcio);


    }
    public function testexisteixDataBetwenDates(){
        $DatesFestius = new DatesFestius();
        $data = "2016-05-01";
        if(count($DatesFestius->existeixDataBetwenDates($data)) > 0)
        {
            $res = True;
        }else{
            $res = False;
        }
        echo $res;
        $this->assertEquals($res,True);

    }
}
