コード例 #1
0
ファイル: LogEntryTest.php プロジェクト: Webiny/AnalyticsDb
 public function testAddGetDimension()
 {
     $le = new LogEntry('page');
     $this->assertSame([], $le->getDimensions());
     $le->addDimension('browser', 'fireWolf', 100);
     /**
      * @var $dim LogDimension
      */
     $dim = $le->getDimensions()[0];
     $this->assertInstanceOf('Webiny\\AnalyticsDb\\LogDimension', $dim);
     $this->assertSame('browser', $dim->getName());
     $this->assertSame('fireWolf', $dim->getValue());
     $this->assertSame(100, $dim->getIncrement());
 }