Exemple #1
0
 public function setUp()
 {
     require 'vendor/autoload.php';
     $this->startDate = new \DateTime("5 years ago");
     $this->endDate = new \DateTime("4 years ago");
     $this->symbol = 'AAPL';
     // make the query
     $this->query = sprintf("select * from yahoo.finance.historicaldata where startDate='%s' and endDate='%s' and symbol='%s'", $this->startDate->format("Y-m-d"), $this->endDate->format("Y-m-d"), $this->symbol);
     // get result
     $this->result = \Yql\Query::execute($this->query);
 }
Exemple #2
0
 public function testExecute()
 {
     $ret = \Yql\Query::execute($this->query);
     $this->assertInstanceOf(\Yql\Result::class, $ret, 'A Query returns a Result');
 }