You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Web/Sources/vendor/adriangibbons/php-fit-file-analysis/tests/pFFA-EnumData-Test.php

34 lines
887 B

<?php
error_reporting(E_ALL);
if(!class_exists('adriangibbons\phpFITFileAnalysis')) {
require __DIR__ . '/../src/phpFITFileAnalysis.php';
}
class EnumDataTest extends PHPUnit_Framework_TestCase
{
private $base_dir;
private $filename = 'swim.fit';
private $pFFA;
public function setUp()
{
$this->base_dir = __DIR__ . '/../demo/fit_files/';
$this->pFFA = new adriangibbons\phpFITFileAnalysis($this->base_dir . $this->filename, ['units' => 'raw']);
}
public function testEnumData_manufacturer()
{
$this->assertEquals('Garmin', $this->pFFA->manufacturer());
}
public function testEnumData_product()
{
$this->assertEquals('Forerunner 910XT', $this->pFFA->product());
}
public function testEnumData_sport()
{
$this->assertEquals('Swimming', $this->pFFA->sport());
}
}